TinyMCE adding rn to every new line added

I’m dynamically calling TinyMCE on the page to save an input value. When I type in the field, it is adding rn to every new line and then saving it as such. Any thoughts on what I can do to stop this?

$textBox.addClass(‘tinymce-enabled’);
tinymce.init({
selector: ‘.tinymce-enabled’,
mode: ‘exact’,
theme: “modern”,
skin: “lightgray”,
menubar: false,
statusbar: true,
toolbar: [
“bold italic | alignleft aligncenter alignright | bullist numlist outdent indent | undo redo”
],
plugins: “paste”,
paste_auto_cleanup_on_paste: true,
paste_postprocess: function (pl, o) {
o.node.innerHTML = o.node.innerHTML.replace(/ +/ig, ” “);
}
});

Read more here:: TinyMCE adding rn to every new line added

Leave a Reply

Your email address will not be published. Required fields are marked *