Preserve Non-Breaking Characters (&nbsp, &#8209)

Hi forum!
I’m using CodeMirror integrated with Froala WYSIWYG. I wanted to know if there is a way to preserve non-breaking characters, such as spaces (&nbsp) or hyphens (&#8209), without converting them to their visual format, when switching between Edit and Code Modes.


CodeMirror doesn’t automatically convert such characters.