Some modifications which does not affect the multiline editor directly, but are required for selections including embedded nodes in the richtext editor.