When setting the mode to text/palin the editor doesn't remove syntax highlighting #1137

Closed
benbro opened this Issue Jan 6, 2013 · 0 comments

Projects

None yet

2 participants

@benbro

When changing the mode to plain text ('null' or text/palin)
editor.setOption("mode", 'null');
the editor doesn't remove previous syntax highlighting until you refresh it.

To reproduce, open the demo
http://codemirror.net/mode/javascript/index.html
In firebug set the mode to plain text
editor.setOption("mode", "text/plain");
The code still use the javascript mode for the existing text.
Set the editor value and see that it is now using the plain text mode:
editor.refresh();

Thanks

@marijnh marijnh added a commit that closed this issue Jan 7, 2013
@marijnh marijnh Make sure loadMode triggers a redraw
Closes #1137
21e22c6
@marijnh marijnh closed this in 21e22c6 Jan 7, 2013
@suhajdab suhajdab added a commit that referenced this issue Feb 7, 2013
@marijnh marijnh Make sure loadMode triggers a redraw
Closes #1137
0d31802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment