So we recently updated to tinymce 5. So far it's broken a few of our things but we've managed to get things working close enough to how they were with 4.
I am having trouble with on issue however. All our editors used to have the following properties set
This was necessary so our users would have their printed content look the same as what it looks like in the editor. (using html to pdf libraries would put too large spaces if using p_newlines).
With tinymce 4 this would work perfectly. only <br /> tags would be added for new lines, no uneeded <p> or <div> tags would clutter the editor making things look ugly once printed.
but once upgraded to 5 I noticed when pressing enter on the first line in an editor, instead of creating the <br /> tag it would do nothing. By removing the invalid_elements: "div" property I saw it wasn't doing nothing, but it was creating a div block below the first line after pressing enter. Everything within this div block would then work as before. But with the invalid element property set that block was being removed. This ended up causing a bunch of problems with some of our other features which relied on there being a <br /> tag there.
now I've tried all kinds of things, including changing the above properties to just forced_root_block: false, but currently I can't find a way to replace that div block with a <br />, I can always change the content when a <div> block is added, but then I have to deal with resetting the cursor position, which comes with a whole other set of problems.
Does anyone know why this is happening with tinymce 5 and not 4? Is there anything I can do about this?