Fix inserting linebreaks in editable spans

Please consider :)
Changelog: This change fixes the behaviour of linebreaks by preventing paragraphs to be inserted inside editable spans and paragraphs, and improves the editor's robustness against errors when inserting paragraphs.