Open mpz opened 5 years ago
my Fix
initFlask(code){
if(!this.flask){
this.flask = new CodeFlask('.code', { language: 'js', lineNumbers: true });
this.flask.onUpdate((code) => {
this.new_code = code;
});
}
this.flask.updateCode(code);
this.flask.setLineNumber(); // manualy update lines
}
my Fix
initFlask(code){ if(!this.flask){ this.flask = new CodeFlask('.code', { language: 'js', lineNumbers: true }); this.flask.onUpdate((code) => { this.new_code = code; }); } this.flask.updateCode(code); this.flask.setLineNumber(); // manualy update lines }
I wrote it like your, but it doesn't work
my Fix
initFlask(code){ if(!this.flask){ this.flask = new CodeFlask('.code', { language: 'js', lineNumbers: true }); this.flask.onUpdate((code) => { this.new_code = code; }); } this.flask.updateCode(code); this.flask.setLineNumber(); // manualy update lines }
I wrote it like your, but it doesn't work
I solved it, because of the problem of passing parameters,the parameters can only be strings
On loading I have:
After pressing Enter or any code changes:
Code lines appeared!
Need load lines on init