Use pagebreak plugin from tinyMCE instead of drupalbreak

flobruit - April 15, 2008 - 23:32
Project:TinyMCE
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

When using TinyMCE 3.05 and the paging module, the built-in pagebreak plugin can be used by adding the following code to plugin_reg.php:

if (module_exists('paging')) {
  $plugins['pagebreak']['theme_advanced_buttons3'] = array('pagebreak');
  $plugins['pagebreak']['pagebreak_separator'] = array('<!--pagebreak-->');
}

The existing drupalbreak plugin that ships with tinyMCE is broken and duplicates core TinyMCE functionality. This could also be used to insert <!--break --> tags, but this functionality is already implemented by drupal core itself.

#1

GiorgosK - April 25, 2008 - 03:20

flobruit
I did get pagebreak to work but how do I make

<!--break -->

to work ??

#2

GiorgosK - May 16, 2008 - 06:47

I finally got <!--break--> to work with tinyMCE 3

$plugins['pagebreak'] = array();
$plugins['pagebreak']['theme_advanced_buttons3'] = array('pagebreak');
$plugins['pagebreak']['pagebreak_separator'] = array('<!--break-->');

but I don't know how to make both <!--pagebreak--> and <!--break--> appear at the same time

It would be interesting to find out

#3

dafeder - June 17, 2008 - 04:33

That still shows in the WISIWYG box, even though the actual code is correct. I don't understand the instructions here: http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak - where do you set the options they mention?

#4

rimu - July 12, 2008 - 00:48

worked for me :-D

thanks!

#5

mdowsett - December 22, 2008 - 17:43

not working for me...I have two "Drupal Teaser/Body Break" checkboxes in the /admin/settings/tinymce/edit/TinyOK page (set up page for my 'TinyOK' TinyMCE role). I check both but neither shows up with the other buttons in my node edit pages

#6

Xandle - March 12, 2009 - 17:31

It works, thank you!

 
 

Drupal is a registered trademark of Dries Buytaert.