0
votes

I'm using TinyMCE to edit content blocks in a CMS.

Some of these content blocks will include opening HTML tags (including Doctype, Html, Head, Styles, Scripts etc.) and some will not.

I've spent the afternoon looking all over the web trying to find a solution to this and the only answer seems to be to include "fullpage" as one of the plugins, the only problem with this is that fullpage then starts every new content block with the boilerpate html code and also tries to insert them into any existing blocks which don't already have them.

Any ideas?

The only thing I can think of doing is a nasty hack: use fullpage but then clear the contents of the tinymce area on page load / document ready via JS before I load in any content.

1

1 Answers

0
votes

You could do without the fullpage plugin. Treat those tags as a 'frame' of the content you want to insert. When initializing tinymce do it with the dom elments under the body-tag and add those tags back when editing in the editor is finished.