I am using TinyMCE 4.x version, BBCode as a source in my project. Below is the TinyMCE init code for it,
tinymce.init({
mode: "textareas",
editor_selector: "mceEditor",
resize: "both",
forced_root_block: false,
remove_redundant_brs : false,
verify_html : false,
force_br_newlines: true,
force_p_newlines: false,
remove_redundant_brs : false,
remove_linebreaks : false,
valid_elements: 'br',
plugins: ["autolink link image anchor bbcode code noneditable"],
toolbar: "bold italic link | code | bbcode",
});
If I add newline or extra line/space at the end of content and trying to get content from javascript(tinyMCE.activeEditor.getElement().val()
), the content got is in trimmed form. Is there anyway to stop trimming the right trim of the content while we get content from TinyMCE?
I have tried different options from this: Linebreaks in TinyMCE editor show extra line on preview, not in code, tinymce remove text spaces and line breaks link but options does not worked for me.
Does anyone has an idea what changes that I need to make to overcome from this issue?