Selectively Disable Addons

I have a HTML page with 3 separate CodeMirror instances for different types of input. I am currently including the search and dialog addon so people are able to search within each of my CodeMirror instances. However, how can I selectively disable these addons on one of my CodeMirror instances to disable this functionality but leave it active on the other two?

1 Like

Both of these addons are passive, and don’t do anything until used. So if you don’t bind any search-related keys, the search won’t do anything. The default keymap does bind Ctrl-F, Ctrl-G, Shift-Ctrl-F, Shift-Ctrl-G, and Shift-Ctrl-R to search-related features, so you should disable those bindings if you don’t want them to exist in a given editor (for example by binding them to null in an extraKeys option).