CMS  Version 3.9
manifest.inc
Go to the documentation of this file.
1 <?php
8 {
9  static function getComponentDefinition()
10  {
11  $component = new Component();
12  $component->name = "html_editor";
13  $component->description = "Allows extensions and configuration for the HTML editor";
14  $component->author = "Andy Green";
15  $component->version = "1.0";
16  $component->priority = 2;
17  $component->enabled = true;
18 
19  return $component;
20  }
21 
22  static function getScripts()
23  {
24  return array("/components/html_editor/js/snippet_manager.js",
25  "/components/html_editor/js/snippet_tinymce_plugin.js",
26  "/components/html_editor/js/custom_css_manager.js",
27  "/components/html_editor/js/custom_css_tinymce_plugin.js",
28  "/components/html_editor/js/tag_editor.js",
29  "/components/html_editor/js/tag_editor_tinymce_plugin.js"
30  );
31  }
32 
33  static function getStyles()
34  {
35  return array("/components/html_editor/css/html_editor.css");
36  }
37 
38  static function registerPlugins()
39  {
40  HtmlEditorManager::registerPlugin("Insert Snippet", "snippet");
41  if (Settings::getValue("html_editor", "enable_custom_CSS") && checkRole("admin"))
42  {
43  HtmlEditorManager::registerPlugin("Edit Custom CSS", "custom_css");
44  }
45  HtmlEditorManager::registerPlugin("Edit HTML Tag", "tag_editor");
46  }
47 
48  var $allow_sessionless_handlers = array("custom_css");
49 
50  static function subscribeToEvents()
51  {
52  return array("upgradeComponent" => array(HtmlEditorManager, upgradeComponent),
53  "ComponentScanComplete" => array(HtmlEditorManager, setDefaults),
54  "Initialize" => array(HtmlEditorManager, onInitialize),
55  "RegisterSerializationHandler" => array(HtmlEditorManager, registerSerializationHandler),
56  "RegisterHTMLEditorPlugins" => array(HtmlEditorManifest, registerPlugins),
57  "PreProcessPage" => array(HtmlEditorManager, applyCustomCSS)
58  //TODO: Add Event Registrations here
59  );
60  }
61 }
62 ?>
$component
Definition: help.inc:38
Provides a central management class for event handlers and common functionality for the html_editor c...
static registerPlugin($title, $plugin)
static registerPlugins()
Definition: manifest.inc:38
static subscribeToEvents()
Definition: manifest.inc:50
static getComponentDefinition()
Definition: manifest.inc:9
static getStyles()
Definition: manifest.inc:33
static getScripts()
Definition: manifest.inc:22
static getValue($component, $name)
Retrieve the value of the specified Setting.
Definition: settings.inc:104