Print

Print


On 12/20/2012 6:14 AM, Sebastian Rahtz wrote:
> It does seem to me that CodeMirror does not support syntax checking or validation in any way,
> have you found some indicator that it can do so?
The reason I believe CodeMirror can be so blazingly fast with large 
documents is that it does not reparse the whole document after each 
change (at least it was this way in version 1). That being said, you can 
hook up CodeMirror to a well-formedness checker (DOMParser would work 
fine) or if you have a JavaScript validation library in mind for 
RelaxNG, etc. to that, and perhaps hook into CodeMirror 3's inline 
widgets if the checker is line-aware: http://codemirror.net/demo/widget.html
> it would be just wonderful if you found or made this mythical beast....
> --
> Sebastian Rahtz
> http://www.justgiving.com/SebastianRahtz
> Director (Research Support) of Academic IT Services
> University of Oxford IT Services
> 13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
>