codemirror icon indicating copy to clipboard operation
codemirror copied to clipboard

Cannot change code

Open mats68 opened this issue 9 years ago • 1 comments

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 avatar Sep 16 '15 10:09 mats68

@mats68 excuse me for late answer :(

editorCode is not reactive. To change code dynamically, try using reactiveVar (see README.md)

perak avatar Sep 29 '15 21:09 perak