0
votes

I'm using Codemirror to replace my textarea. If I set the value of CodeMirror to a very long line(with more than 50,000 words), Codemirror does not highlight all the words. Highlighting stopped somewhere and it seems like there is a maximum number of words per line that Codemirror can only handle. Do I need to set some options that will solve this issue?

Thank you.

1

1 Answers

0
votes

Looks like 10 000 is the default:

maxHighlightLength: number

When highlighting long lines, in order to stay responsive, the editor will give up and simply style the rest of the line as plain text when it reaches a certain position. The default is 10 000. You can set this to Infinity to turn off this behavior.

Source: http://codemirror.net/doc/manual.html#config