I'm trying to use codeflask in my avnav project.
There were 2 drawbacks:
when using the editor initially it always calls the update callback. This makes it slightly complicated to find out if there really was a change. So I introduced a parameter on updateCode and an option "noInitialCallback" to prevent those calls if you intend
I found no easy way to add more languages to prism in a webpack/ES6 environment. I ended up with importing prism by my own again and adding the language to codeflask from the prism instance. But this way we end up having 2 instances of prism - not very nice - and giving some error on startup.
So I introduced an option for the highlighter function: highLighter. If you omit it, there is no highlighter at all. This way I could completely remove prism (of I guess it is needed for test - I was not really able to run them).
The initial call looks like
var editor=new Flask('editor',{ language:'js', highLighter:Prism.highlightElement, noInitialCallback:true}
Maybe you would be interested in considering this PR - or some similar solution.
I'm trying to use codeflask in my avnav project. There were 2 drawbacks:
var editor=new Flask('editor',{ language:'js', highLighter:Prism.highlightElement, noInitialCallback:true}
Maybe you would be interested in considering this PR - or some similar solution.
Best regards Andreas