Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Remove Paragraph (p) tags – TinyMCE HTMLeditor

Solution

In order to remove the paragraph or p tags that automatically gets inserted by TinyMCE, open the tinymce.js file and include the following lines:

force_p_newlines : false,
force_br_newlines : true,
forced_root_block : ”,

Problem:

Hi guys,

Is there a hack or anything else that I can disable that? I don’t want any <p> only <br /> should be made.

Thanks for answers ahead!

chameleon

Solution:

I don’t know how many times I told people to:
1) Check the manual
2) Search the forums
3) Once done 1 & 2, THEN post on the forums.

anyway, what you are looking for is force_br_newlines & force_p_newlines:

force_br_newlines : true, force_p_newlines : false

Solution 2:

<script>
tinyMCE.init({

                force_p_newlines: false
});
</script>



This post first appeared on PHP Fresher, please read the originial post: here

Share the post

Remove Paragraph (p) tags – TinyMCE HTMLeditor

×

Subscribe to Php Fresher

Get updates delivered right to your inbox!

Thank you for your subscription

×