I'm facing a challenge and struggling to come up with a solution. It could be due to incorrect setup or oversight on my part, but I suspect it might also be a bug.
The issue is with the TinyMce setup applied in a Div (editable).
setup: function (editor) {
forced_root_block: false,
force_p_newlines: false,
plugins: 'autolink link paste',
valid_elements: 'a[href|rel|target=_blank],br,p',
toolbar: false,
menubar: false,
statusbar: false,
paste_auto_cleanup_on_paste: true,
inline: true,
default_link_target: '_blank'
};
When entering a link in the div and pressing Enter, the next character and <br>
are included within the generated <a>
tag. The result looks like this:
<a href="http://www.google.co">www.google.com<br>a</a>sda</div>
If I type Space instead of Enter, it works correctly.
Any suggestions on what might be causing this behavior?