Reputation: 5838
I work with TinyMCE and it surrounds my text with a <p>
tag.
I tried using this: forced_root_block : ""
following this: How can I remove p tags that are auto added within tinymce
and this isn't working for me :X
I saw this post too: remove the extra p tag in tinyMCE
and added:
forced_root_block : "",
force_br_newlines : true,
force_p_newlines : false
and this isn't helping.
This is my current code part:
<script type="text/javascript">
tinymce.init({
selector: ".mytextarea",
plugins: "paste",
paste_auto_cleanup_on_paste : true,
paste_remove_styles: true,
paste_remove_styles_if_webkit: true,
paste_strip_class_attributes: "all",
forced_root_block : "",
force_br_newlines : true, // tried with and without
force_p_newlines : false // tried with and without
//paste_remove_spans : true
});
</script>
Upvotes: 1
Views: 2117
Reputation: 6992
you need to add the following line to your init statement
forced_root_block :false
<script type="text/javascript">
tinymce.init({
selector: ".mytextarea",
plugins: "paste",
paste_auto_cleanup_on_paste : true,
paste_remove_styles: true,
paste_remove_styles_if_webkit: true,
paste_strip_class_attributes: "all",
forced_root_block : false,
force_br_newlines : true, // tried with and without
force_p_newlines : false // tried with and without
//paste_remove_spans : true
});
</script>
if this not work than try change in "tiny_mce.js" and not in "tiny_mce_src.js"
Upvotes: 3