I can trigger a change
event by typing text into the editor and by some methods (replaceRange
, for example). Is there any way to detect how exactly was trigger change
event ?
1 Like
Ah, found an answer in the docs, sorry for inconvenience
Could you describe what the answer you found was and where you found it? The people of the future will thank you (see http://xkcd.com/979/).
https://codemirror.net/doc/manual.html#events
I found that the change
event has an changeObj.origin
param which can be used to obtain a source of an event. And the replaceRange
method has a optional param origin
which can be used to pass desirable value.