I'm using TinyMce to insert/edit a text from a database, but I don't know why the <br />
's are missing. There are no new lines, even if I hit ENTER or SHIFT + ENTER.
TinyMce init:
tinyMCE.init({
mode : "textareas",
theme : "simple",
force_p_newlines : false,
force_br_newlines : true,
convert_newlines_to_brs : false
});
According to the TinyMCE documentation for force_br_newlines
:
This option is deprecated as of 3.5 use forced_root_blocks: false instead to control p vs br behavior.
As of version 3.0a1, forced_root_block
is enabled by default. The documentation also says that if you disable this option, Enter will produce a <br />
, while Shift+Enter will produce a <p>
.
Try this:
tinyMCE.init({
mode : "textareas",
theme : "simple",
forced_root_block : false,
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With