codemirror
codemirror copied to clipboard
Cannot change code
Hello
The code (editorCode) is initially correct, but cannot change it afterwards (show correct in alert):
{{> CodeMirror id="edJs" name="someName" options=editorOptions code=editorCode }}
editorOptions: function() { return { lineNumbers: true, mode: "javascript" } }, editorCode: function() { alert(this.js); return this.js; }
@mats68 excuse me for late answer :(
editorCode
is not reactive. To change code dynamically, try using reactiveVar
(see README.md)