I am using tinymce wysiwyg editor in my Application. I save my tinymce o/p in my database, but when i retrieve it in my html page it is adding blank extra line that i don't want.
For Ex:- when i am giving following i/p in my editor
Hi,
This is a test message.
Thanks,
Salil
Is looking like following in my html page
Hi,
########This is blank extra line that i don't want
This is a test message.
########This is blank extra line that i don't want
Thanks,
########This is blank extra line that i don't want
Salil
and It is generating following html in my database
<p>Hi, </p>
<p>This is marketing mail.</p>
<p> </p>
<p>Thanks,</p>
<p>Salil</p>
开发者_如何学JAVA
Any help is appreciated.
Note :- I tried (add/remove both) p {margin:0; padding: 0;}
but it is not working for me.
Issue is fixed after adding following lines in tinyMCE.init({ });
force_p_newlines : false,
force_br_newlines : false,
forced_root_block : false,
convert_newlines_to_brs: false,
// Not to add br elements.
remove_linebreaks : true,
精彩评论