From fbfaea71c65afc698417ca0229cc5075dbdc0d86 Mon Sep 17 00:00:00 2001 From: Ted Serbinski Date: Tue, 29 Nov 2005 19:21:37 +0000 Subject: [PATCH] added more TinyMCE plugins and improved help docs for adding plugins --- INSTALL.txt | 51 +++++++++++++++++++++++++++++++++++++++++++-------- plugin_reg.php | 15 ++++++++++----- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/INSTALL.txt b/INSTALL.txt index 85d7318..b9e6ea9 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -13,6 +13,7 @@ Dependancies: http://tinymce.moxiecode.com/tinymce/docs/compatiblity_chart.html + INSTALLATION: ******************************************************************** 1. Place the entire tinymce directory into your Drupal modules/ @@ -54,6 +55,7 @@ INSTALLATION: Create new content as a role that has TinyMCE permissions and see TinyMCE in action! + README: ******************************************************************** Once TinyMCE is enabled, the default behavior is that all textareas @@ -70,18 +72,49 @@ TinyMCE completely. The admin can also define which pages TinyMCE should be used on. This cannot be changed on a per user basis. -DRUPAL PLUGINS FOR TINYMCE: + +PLUGINS FOR TINYMCE: ******************************************************************** -NOTE: If you want to use img_assist with TinyMCE, you don't have to +Adding plugins to TinyMCE is very easy. By default, all TinyMCE +plugins are disabled, but can easily be enabled by going to: + + Administer > settings > tinymce + +And then editing a profile (make sure you create one first!) and going +to the Buttons & Plugins section. To enable a button or a plugin, +simply check a box and TinyMCE will automatically be updated. To find +out more info on what a specific button or plugin does, click the +corresponding link (note not all buttons have help text). + +If you wish to add more plugins to TinyMCE, simply extract these +plugins to the folder: tinymce\jscripts\tiny_mce\plugins + +Then open up plugin_reg.php, found in the TinyMCE module folder. + +Add the following lines: + + $plugins['plugin_name'] = array(); + $plugins['plugin_name']['theme_advanced_buttons3'] = array('icon_name'); + // note, you can choose which row of buttons to use by changing + // the 3 to either 1 or 2 + $plugins['plugin_name']['plugin_property'] = array('property_value'); + +Be sure to set the 'plugin_name' to the name of the plugin (generally +the plugin folder name) and set the 'icon_name' and other properties +(properties are optional). See plugin_reg.php for more examples. + +To add Drupal specific plugins, TinyMCE comes bundled with plugins +in the main module directory. These plugins include: + + - drupalimage: works in conjunction with the img_assist Drupal + module + + NOTE: If you want to use img_assist with TinyMCE, you don't have to install a plugin. Just enable the img_assist module and click the photo icon that appears below each textarea. -Located in the plugins directory are Drupal specific plugins for -TinyMCE. Once you've downloaded and installed the TinyMCE engine, -copy this plugins over the directory of TinyMCE -(tinymce/jscripts/tiny_mce/). Most of these plugins will already be -active if you use the 'advanced' theme for tinymce. See the -documentation in each plugin folder for more details. +Follow the directions in the README.txt for these plugins to enable them. + CAVEATS ******************************************************************** @@ -94,6 +127,7 @@ use TinyMCE exclusively. To modify your input formats go to: Administer > input formats > configure > configure filters + TWEAKING THE TINYMCE THEME ******************************************************************** @@ -162,6 +196,7 @@ sent to TinyMCE: http://tinymce.moxiecode.com/documentation.php + TINYMCE KEYBOARD SHORTCUTS ******************************************************************** Ctrl+Z Undo diff --git a/plugin_reg.php b/plugin_reg.php index 7102f90..cc54fb3 100644 --- a/plugin_reg.php +++ b/plugin_reg.php @@ -30,14 +30,16 @@ $plugins['advimage']['extended_valid_elements'] = array('img[class|src|border=0| $plugins['advlink'] = array(); $plugins['advlink']['extended_valid_elements'] = array('a[name|href|target|title|onclick]'); +$plugins['autosave'] = array(); + +$plugins['contextmenu'] = array(); + // Note this isn't a true plugin, rather it's buttons made available by the advanced theme. $plugins['default'] = array(); $plugins['default']['theme_advanced_buttons1'] = array('bold', 'italic', 'underline', 'strikethrough', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'bullist', 'numlist', 'outdent', 'indent', 'undo', 'redo', 'link', 'unlink', 'anchor'); $plugins['default']['theme_advanced_buttons2'] = array('image', 'cleanup', 'forecolor', 'backcolor', 'sup', 'sub', 'code', 'hr'); $plugins['default']['theme_advanced_buttons3'] = array('cut', 'copy', 'paste', 'visualaid', 'removeformat', 'charmap', 'help'); -$plugins['contextmenu'] = array(); - $plugins['directionality'] = array(); $plugins['directionality']['theme_advanced_buttons3'] = array('ltr', 'rtl'); @@ -59,11 +61,16 @@ $plugins['fullscreen']['theme_advanced_buttons3'] = array('fullscreen'); $plugins['iespell'] = array(); $plugins['iespell']['theme_advanced_buttons3'] = array('iespell'); +$plugins['inlinepopups'] = array(); + $plugins['insertdatetime'] = array(); -$plugins['insertdatetime']['theme_advanced_buttons2'] = array('insertdate', 'inserttime'); +$plugins['insertdatetime']['theme_advanced_buttons2'] = array('insertdate', 'inserttime'); $plugins['insertdatetime']['plugin_insertdate_dateFormat'] = array('%Y-%m-%d'); $plugins['insertdatetime']['plugin_insertdate_timeFormat'] = array('%H:%M:%S'); +$plugins['paste'] = array(); +$plugins['paste']['theme_advanced_buttons3'] = array('pastetext', 'pasteword', 'selectall'); + $plugins['preview'] = array(); $plugins['preview']['theme_advanced_buttons2'] = array('preview'); @@ -79,8 +86,6 @@ $plugins['table']['theme_advanced_buttons3'] = array('tablecontrols'); $plugins['zoom'] = array(); $plugins['zoom']['theme_advanced_buttons2'] = array('zoom'); - - return $plugins; } ?> \ No newline at end of file -- 1.7.4.1