Further to Programmatically editing the Editor content, I now edit the textarea
content directly.
What is the best way to refresh the CodeMirror output?
cm.refresh()
doesn’t appear to be the right choice.
cm.toTextArea()
will over-write the textarea
content which is undesirable.
Currently, I am restating the editor CodeMirror.fromTextArea()
without terminating the previous instance which seems to work.
The question is that, would starting a new instance without terminating the previous one, be the right choice and/or would it cause any issues?
PS. I am new to CodeMirror and implementing CodeMirror as the editor in the next version of my FireMonkey Firefox extension.