]> code.citadel.org Git - citadel.git/blobdiff - webcit/tiny_mce/plugins/_template/editor_plugin.js
Upgrade of TinyMCE is in progress.
[citadel.git] / webcit / tiny_mce / plugins / _template / editor_plugin.js
diff --git a/webcit/tiny_mce/plugins/_template/editor_plugin.js b/webcit/tiny_mce/plugins/_template/editor_plugin.js
deleted file mode 100644 (file)
index 53472c8..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Import plugin specific language pack */\r
-tinyMCE.importPluginLanguagePack('template', 'en'); // <- Add a comma separated list of all supported languages\r
-\r
-/****\r
- * Steps for creating a plugin from this template:\r
- *\r
- * 1. Change all "template" to the name of your plugin.\r
- * 2. Remove all the callbacks in this file that you don't need.\r
- * 3. Remove the popup.htm file if you don't need any popups.\r
- * 4. Add your custom logic to the callbacks you needed.\r
- * 5. Write documentation in a readme.txt file on how to use the plugin.\r
- * 6. Upload it under the "Plugins" section at sourceforge.\r
- *\r
- ****/\r
-\r
-/**\r
- * Gets executed when a editor instance is initialized\r
- */\r
-function TinyMCE_template_initInstance(inst) {\r
-       // You can take out plugin specific parameters\r
-       alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));\r
-}\r
-\r
-/**\r
- * Gets executed when a editor needs to generate a button.\r
- */\r
-function TinyMCE_template_getControlHTML(control_name) {\r
-       switch (control_name) {\r
-               case "template":\r
-                       return '<img id="{$editor_id}_template" src="{$pluginurl}/images/template.gif" title="{$lang_template_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceTemplate\', true);" />';\r
-       }\r
-\r
-       return "";\r
-}\r
-\r
-/**\r
- * Gets executed when a command is called.\r
- */\r
-function TinyMCE_template_execCommand(editor_id, element, command, user_interface, value) {\r
-       // Handle commands\r
-       switch (command) {\r
-               // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.\r
-               case "mceTemplate":\r
-                       // Show UI/Popup\r
-                       if (user_interface) {\r
-                               // Open a popup window and send in some custom data in a window argument\r
-                               var template = new Array();\r
-\r
-                               template['file'] = '../../plugins/template/popup.htm'; // Relative to theme\r
-                               template['width'] = 300;\r
-                               template['height'] = 200;\r
-\r
-                               tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"});\r
-\r
-                               // Let TinyMCE know that something was modified\r
-                               tinyMCE.triggerNodeChange(false);\r
-                       } else {\r
-                               // Do a command this gets called from the template popup\r
-                               alert("execCommand: mceTemplate gets called from popup.");\r
-                       }\r
-\r
-                       return true;\r
-       }\r
-\r
-       // Pass to next handler in chain\r
-       return false;\r
-}\r
-\r
-/**\r
- * Gets executed when the selection/cursor position was changed.\r
- */\r
-function TinyMCE_template_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {\r
-       // Deselect template button\r
-       tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonNormal');\r
-\r
-       // Select template button if parent node is a strong or b\r
-       if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B")\r
-               tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonSelected');\r
-\r
-       return true;\r
-}\r
-\r
-/**\r
- * Gets executed when contents is inserted / retrived.\r
- */\r
-function TinyMCE_template_cleanup(type, content) {\r
-       switch (type) {\r
-               case "get_from_editor":\r
-                       alert("[FROM] Value HTML string: " + content);\r
-\r
-                       // Do custom cleanup code here\r
-\r
-                       break;\r
-\r
-               case "insert_to_editor":\r
-                       alert("[TO] Value HTML string: " + content);\r
-\r
-                       // Do custom cleanup code here\r
-\r
-                       break;\r
-\r
-               case "get_from_editor_dom":\r
-                       alert("[FROM] Value DOM Element " + content.innerHTML);\r
-\r
-                       // Do custom cleanup code here\r
-\r
-                       break;\r
-\r
-               case "insert_to_editor_dom":\r
-                       alert("[TO] Value DOM Element: " + content.innerHTML);\r
-\r
-                       // Do custom cleanup code here\r
-\r
-                       break;\r
-       }\r
-\r
-       return content;\r
-}\r