How to control teaser breaks with the TinyMCE editor in Drupal
The TinyMCE module comes packaged with the drupalbreak plugin. This TinyMCE plugin (not the Drupal module) adds two buttons that create a teaser or page break. (The teaser break is a built-in Drupal core feature. The page break requires the paging module.)
The code to create these breaks is:
<!--break-->
<!--pagebreak-->
1. Copy the entire directory tinymce/plugins/drupalbreak into the plugins directory of the TinyMCE actual. (tinymce/tinymce/jscripts/tiny_mce/plugins/)
% cd ~/public_html/drupalbase/
% cp -r modules/tinymce/plugins/drupalbreak/ modules/tinymce/tinymce/jscripts/tiny_mce/plugins/
2. To add the break buttons to your TinyMCE profile, first insert the following lines to modules/tinymce/plugin_reg.php. Place them near the end of the file, just before you see return $plugins.
$plugins['drupalbreak'] = array();
$plugins['drupalbreak']['theme_advanced_buttons3'] = array('drupalbreak', 'drupalpagebreak');
3. Add the buttons to your TinyMCE profiles at admin/settings/tinymce.
Post new comment