javascript - Highlight invalid tokens when parsing JSON on a web editor (Codemirror, Ace) -
ace editor , code mirror, both incredibly web code editors. however, both of error highlighting line-based (reported on line gutter)
i'm using editors json, , i'm looking way highlight errors based on tokens, similar how sublime highlights json:
notice in above, sublime highlights errant tokens. want achieve same thing in ace or codemirror.
one way think it, codemirror has marktext
command can 'mark' text (add css) based on position. guess can use if had regex match invalid tokens.
Comments
Post a Comment