Search code examples
javascriptcodemirror

Is there limit of history size in Codemirror?


In my app I have multiple files and I use a separate Codemirror.doc for each file to store file history. I don't want end up storing a very huge file containing all history. Is there some limit for history size in codemirror? And if so, can I change it?


Solution

  • There is an option undoDepth in Codemirror configuration which defaults to 200. You can easily change it, when you initialize an editor.