| | 1 | <?php |
| | 2 | // $Id$ |
| | 3 | |
| | 4 | /** |
| | 5 | * @file |
| | 6 | * Registers TinyMCE plugins for the Drupal TinyMCE module. Note these settings |
| | 7 | * can be overridden by each Drupal theme. |
| | 8 | */ |
| | 9 | |
| | 10 | function _tinymce_plugins() { |
| | 11 | |
| | 12 | /** |
| | 13 | * A couple of notes about adding plugins. |
| | 14 | * |
| | 15 | * 1) Don't use any of the *_add or *_add_before hooks for theme button placement. |
| | 16 | * Stick with theme_advanced_buttons1, theme_advanced_buttons2, |
| | 17 | * theme_advanced_buttons3 only. |
| | 18 | * |
| | 19 | * 2) You can change the order of the buttons by moving the plugins around in |
| | 20 | * this code. You can also change the order of the button array for each plugin. |
| | 21 | */ |
| | 22 | |
| | 23 | $plugins['advhr'] = array(); |
| | 24 | $plugins['advhr']['theme_advanced_buttons3'] = array('advhr'); |
| | 25 | $plugins['advhr']['extended_valid_elements'] = array('hr[class|width|size|noshade]'); |
| | 26 | |
| | 27 | $plugins['advimage'] = array(); |
| | 28 | $plugins['advimage']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]'); |
| | 29 | |
| | 30 | $plugins['advlink'] = array(); |
| | 31 | $plugins['advlink']['extended_valid_elements'] = array('a[name|href|target|title|onclick]'); |
| | 32 | |
| | 33 | $plugins['autosave'] = array(); |
| | 34 | |
| | 35 | $plugins['contextmenu'] = array(); |
| | 36 | |
| | 37 | // Note this isn't a true plugin, rather it's buttons made available by the advanced theme. |
| | 38 | $plugins['default'] = array(); |
| | 39 | $plugins['default']['theme_advanced_buttons1'] = array('bold', 'italic', 'underline', 'strikethrough', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'bullist', 'numlist', 'outdent', 'indent', 'undo', 'redo', 'link', 'unlink', 'anchor'); |
| | 40 | $plugins['default']['theme_advanced_buttons2'] = array('image', 'cleanup', 'forecolor', 'backcolor', 'sup', 'sub', 'code', 'hr'); |
| | 41 | $plugins['default']['theme_advanced_buttons3'] = array('cut', 'copy', 'paste', 'visualaid', 'removeformat', 'charmap', 'help'); |
| | 42 | |
| | 43 | $plugins['directionality'] = array(); |
| | 44 | $plugins['directionality']['theme_advanced_buttons3'] = array('ltr', 'rtl'); |
| | 45 | |
| | 46 | $plugins['emotions'] = array(); |
| | 47 | $plugins['emotions']['theme_advanced_buttons3'] = array('emotions'); |
| | 48 | |
| | 49 | $plugins['filemanager'] = array(); |
| | 50 | |
| | 51 | $plugins['flash'] = array(); |
| | 52 | $plugins['flash']['theme_advanced_buttons3'] = array('flash'); |
| | 53 | $plugins['flash']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]'); |
| | 54 | |
| | 55 | // Note this isn't a true plugin, rather it's buttons made available by the advanced theme. |
| | 56 | $plugins['font'] = array(); |
| | 57 | $plugins['font']['theme_advanced_buttons1'] = array('formatselect', 'fontselect', 'fontsizeselect', 'styleselect'); |
| | 58 | $plugins['font']['extended_valid_elements'] = array('font[face|size|color|style],span[class|align|style]'); |
| | 59 | |
| | 60 | $plugins['fullscreen'] = array(); |
| | 61 | $plugins['fullscreen']['theme_advanced_buttons3'] = array('fullscreen'); |
| | 62 | |
| | 63 | $plugins['iespell'] = array(); |
| | 64 | $plugins['iespell']['theme_advanced_buttons3'] = array('iespell'); |
| | 65 | |
| | 66 | $plugins['imagemanager'] = array(); |
| | 67 | |
| | 68 | $plugins['inlinepopups'] = array(); |
| | 69 | |
| | 70 | $plugins['insertdatetime'] = array(); |
| | 71 | $plugins['insertdatetime']['theme_advanced_buttons2'] = array('insertdate', 'inserttime'); |
| | 72 | $plugins['insertdatetime']['plugin_insertdate_dateFormat'] = array('%Y-%m-%d'); |
| | 73 | $plugins['insertdatetime']['plugin_insertdate_timeFormat'] = array('%H:%M:%S'); |
| | 74 | |
| | 75 | $plugins['layer'] = array(); |
| | 76 | $plugins['layer']['theme_advanced_buttons3'] = array('insertlayer', 'moveforward', 'movebackward', 'absolute'); |
| | 77 | |
| | 78 | $plugins['paste'] = array(); |
| | 79 | $plugins['paste']['theme_advanced_buttons3'] = array('pastetext', 'pasteword', 'selectall'); |
| | 80 | |
| | 81 | $plugins['preview'] = array(); |
| | 82 | $plugins['preview']['theme_advanced_buttons2'] = array('preview'); |
| | 83 | |
| | 84 | $plugins['print'] = array(); |
| | 85 | $plugins['print']['theme_advanced_buttons3'] = array('print'); |
| | 86 | |
| | 87 | $plugins['searchreplace'] = array(); |
| | 88 | $plugins['searchreplace']['theme_advanced_buttons2'] = array('search', 'replace'); |
| | 89 | |
| | 90 | |
| | 91 | if (is_dir(drupal_get_path('module', 'tinymce') . '/tinymce/jscripts/tiny_mce/plugins/spellchecker/')) { |
| | 92 | $plugins['spellchecker'] = array(); |
| | 93 | $plugins['spellchecker']['theme_advanced_buttons3'] = array('spellchecker'); |
| | 94 | } |
| | 95 | |
| | 96 | $plugins['style'] = array(); |
| | 97 | $plugins['style']['theme_advanced_buttons3'] = array('styleprops'); |
| | 98 | |
| | 99 | $plugins['table'] = array(); |
| | 100 | $plugins['table']['theme_advanced_buttons3'] = array('tablecontrols'); |
| | 101 | |
| | 102 | $plugins['zoom'] = array(); |
| | 103 | $plugins['zoom']['theme_advanced_buttons2'] = array('zoom'); |
| | 104 | |
| | 105 | return $plugins; |
| | 106 | } |