I’m working on a personal project where there’s a comparison of original text to text being typed. When the original text is changed I wanted to be able to force a reparsing of the text being typed by the user.
instance.setOption('mode', instance.getOption('mode'));
instance
is the what is returned when you instantiate your Codemirror editor.
The code is setting the mode of the editor what it’s already set at, triggering the reparsing.
Nice!