Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop tinymce from adding <!DOCTYPE html><html><head></head><body> to everything I enter?

I am using TinyMCE as the editor for a field in my database. When I use it and add the text "abc" then this is what gets stored in the database:

<!DOCTYPE html><html><head></head><body><p>abc</p></body></html>

How can I stop TinyMCE from adding everything around the <p> tags?

like image 788
Alan2 Avatar asked Jul 24 '13 08:07

Alan2


People also ask

How do you get content in TinyMCE with HTML tags?

The TinyMCE getContent and setContent methods You can do this using the getContent() API method. Let's say you have initialized the editor on a textarea with id=”myTextarea”. This will return the content in the editor marked up as HTML.

How do I get rid of TinyMCE toolbar?

The Quick Insert toolbar is intended for buttons related to inserting content, but any TinyMCE toolbar buttons or custom toolbar buttons are allowed. To disable the Quick Insert toolbar, set quickbars_insert_toolbar to false .


2 Answers

maybe this can help , it's when i have add the plugin : fullpage , add the properties button

or hold of a plugin called FullPage.js for TinyMCE.

hope this will help you.

like image 184
liyakat Avatar answered Sep 27 '22 23:09

liyakat


remove fullpage from plugin plugins: [ "advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "table contextmenu directionality emoticons template textcolor paste textcolor colorpicker textpattern" ],

like image 40
jaya Avatar answered Sep 27 '22 22:09

jaya