Dave
Dave

Reputation: 243

Tinymce and printing with page breaks

I have written an application that uses the Tinymce editor. The administrator can create templates, which are then subsequenty loaded by the users. Between fetching the template from the database and inserting it into the editor, I perform a merge with the current record. This all works fine.

I am however having problems with the printing of documents using page breaks. They seeem to be ignored.

In the .init file I have the page break plugin loaded, and have also set the following

pagebreak_separator : "<!--pagebreak-->"

Inserting a page break will place a horizontal line in the editor, with the text <!--pagebreak-->". Looking at the source code (html) I can see that the has been inserted, but when I try to print a document which I have split in half using the page break, it seems to ignore it.

To my surprise, this posting

http://tinymce.moxiecode.com/punbb//viewtopic.php?pid=56419

seems to suggest that the insertion of a line break does nothing more than insert a line of of html code. Is this correct? This being the case can someone suggest how I go about this please.

FYI I am using the jquery version of TinyMCE.

Thanks

Upvotes: 3

Views: 10113

Answers (1)

Xiong Chiamiov
Xiong Chiamiov

Reputation: 13714

You'll want to replace <!-- pagebreak --> with an actual element, as page-breaking itself is done with CSS. Try <div style="page-break-before: always; clear:both"/></div>.

Upvotes: 7

Related Questions