| Commit | Line | Data |
|---|---|---|
| a59a8ef6 MW |
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['advimg']['extended_valid_elements'] = array('img[class|src|border=0|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 | // Note this isn't a true plugin, rather it's buttons made available by the advanced theme. | |
| 34 | $plugins['default'] = array(); | |
| 35 | $plugins['default']['theme_advanced_buttons1'] = array('bold', 'italic', 'underline', 'strikethrough', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'bullist', 'numlist', 'outdent', 'indent', 'undo', 'redo', 'link', 'unlink', 'anchor'); | |
| 36 | $plugins['default']['theme_advanced_buttons2'] = array('image', 'cleanup', 'forecolor', 'backcolor', 'sup', 'sub', 'code', 'hr'); | |
| 416c4bc5 | 37 | $plugins['default']['theme_advanced_buttons3'] = array('cut', 'copy', 'paste', 'visualaid', 'removeformat', 'charmap', 'help'); |
| a59a8ef6 MW |
38 | |
| 39 | $plugins['contextmenu'] = array(); | |
| 40 | ||
| 41 | $plugins['directionality'] = array(); | |
| 42 | $plugins['directionality']['theme_advanced_buttons3'] = array('ltr', 'rtl'); | |
| 43 | ||
| 44 | $plugins['emotions'] = array(); | |
| 45 | $plugins['emotions']['theme_advanced_buttons3'] = array('emotions'); | |
| 46 | ||
| 47 | $plugins['flash'] = array(); | |
| 48 | $plugins['flash']['theme_advanced_buttons3'] = array('flash'); | |
| 49 | $plugins['flash']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]'); | |
| 50 | ||
| 51 | // Note this isn't a true plugin, rather it's buttons made available by the advanced theme. | |
| 52 | $plugins['font'] = array(); | |
| 53 | $plugins['font']['theme_advanced_buttons1'] = array('fontselect', 'fontsizeselect'); | |
| 54 | $plugins['font']['extended_valid_elements'] = array('font[face|size|color|style],span[class|align|style]'); | |
| 55 | ||
| 56 | $plugins['fullscreen'] = array(); | |
| 57 | $plugins['fullscreen']['theme_advanced_buttons3'] = array('fullscreen'); | |
| 58 | ||
| 59 | $plugins['iespell'] = array(); | |
| 60 | $plugins['iespell']['theme_advanced_buttons3'] = array('iespell'); | |
| 61 | ||
| 62 | $plugins['insertdatetime'] = array(); | |
| 63 | $plugins['insertdatetime']['theme_advanced_buttons2'] = array('insertdate', 'inserttime'); | |
| 64 | $plugins['insertdatetime']['plugin_insertdate_dateFormat'] = array('%Y-%m-%d'); | |
| 65 | $plugins['insertdatetime']['plugin_insertdate_timeFormat'] = array('%H:%M:%S'); | |
| 66 | ||
| 67 | $plugins['preview'] = array(); | |
| 68 | $plugins['preview']['theme_advanced_buttons2'] = array('preview'); | |
| 69 | ||
| 70 | $plugins['print'] = array(); | |
| 71 | $plugins['print']['theme_advanced_buttons3'] = array('print'); | |
| 72 | ||
| 73 | $plugins['searchreplace'] = array(); | |
| 74 | $plugins['searchreplace']['theme_advanced_buttons2'] = array('search', 'replace'); | |
| 75 | ||
| 76 | $plugins['table'] = array(); | |
| 77 | $plugins['table']['theme_advanced_buttons3'] = array('tablecontrols'); | |
| 78 | ||
| 79 | $plugins['zoom'] = array(); | |
| 80 | $plugins['zoom']['theme_advanced_buttons2'] = array('zoom'); | |
| 81 | ||
| 82 | ||
| 83 | ||
| 84 | return $plugins; | |
| 85 | } | |
| 86 | ?> |