ensure text is not lost from rich-text editing experience