sirap-group / tinymce-plugin-headersfooters

A plugin for tinymce WYSIWYG HTML editor that allow to insert headers and footers - requires tinymce-plugin-paginate
https://sirap-group.github.io/tinymce-plugin-headersfooters
GNU Lesser General Public License v2.1
10 stars 1 forks source link

Add a new bogus element on top of body section to support phantomjs convertion to PDF #18

Closed rbecheras closed 7 years ago

rbecheras commented 8 years ago

If we use a phantomjs script server side to convert our documents containing a header, phantomjs will ignore the margin-top a the first element, causing an serious issue for rendering coherence between the HTML view in the editor and the rendered PDF.

To obtain the same rendering, we can add a new "bogus" element on to of the headfoot-body element:

<p class="unselectable" style="height: 1px; margin: 0;" contenteditable="false"></p>

so:

<section contenteditable="true" data-headfoot="true" data-headfoot-body="true">
  <p class="unselectable" style="height: 1px; margin: 0;" contenteditable="false">&nbsp;</p>

  ...
</section>

This element can be added manually but the headersfooters plugin should add it automatically

rbecheras commented 7 years ago

Obsolete due to #30