nteract / commuter

🚎 Notebook sharing hub
BSD 3-Clause "New" or "Revised" License
489 stars 66 forks source link

Turn off the search/replace from the Editor #235

Open rgbkrk opened 6 years ago

rgbkrk commented 6 years ago

The CodeMirror find/replace is currently hijacking the entire Find view if a user clicks inside the cell. Oops!

Madhu94 commented 6 years ago

Could also be the cause of this https://github.com/nteract/nteract/issues/1817 ?

rgbkrk commented 6 years ago

Generally it's these lines: https://github.com/nteract/nteract/blob/0a0cb04cb10ed7d9ea4a96cceb5a142e6230c6ed/packages/editor/src/wrapper.js#L75-L76

Because they enable the default codemirror mode for search/replace in a single editor.

Long term solution

We have/know the entire document so search should be enabled across the entire document and not use the inline search utility.

Mid term solution

Set the codemirror to readOnly, properly, for <NotebookPreview />

Short term solution

Delete the lines that require codemirror/addon/search/* from our editor package in nteract/nteract.