Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl-F cannot be used #178

Closed
pian01 opened this issue Mar 2, 2017 · 11 comments
Closed

Ctrl-F cannot be used #178

pian01 opened this issue Mar 2, 2017 · 11 comments

Comments

@pian01
Copy link

pian01 commented Mar 2, 2017

Ctrl-F lookup cannot be used

@AlonBe
Copy link

AlonBe commented Mar 2, 2017

Did you had any errors on the console?

Ctrl-F tries to load the searchbox extension

Try using: import 'brace/ext/searchbox';

@gillesdemey
Copy link

I can confirm that it works when importing import 'brace/ext/searchbox', thanks @AlonBe!

I suggest we close this one?

@securingsincity
Copy link
Owner

thanks @AlonBe and @gillesdemey

@KurtPreston
Copy link

Is there any way to disable the Ctrl-F functionality instead, so the browser's native search can still be used?

@KurtPreston
Copy link

This StackOverflow post describes how Ace Editor supports removing the command via

editor.commands.removeCommand('find');

Is there a way to do this in react-ace?

@securingsincity
Copy link
Owner

https://github.com/securingsincity/react-ace/blob/master/docs/FAQ.md#how-do-call-methods-on-the-editor-how-do-i-call-undo-or-redo explains how to call methods on the editor. also onLoad returns the instance of the editor so you could also do that there.

@yamyamyuo
Copy link

thanks @AlonBe this works for me!

@hkedia321
Copy link

Hi @yamyamyuo @securingsincity, I am trying this, but getting the error: Uncaught TypeError: _this.requestEditor.removeCommand is not a function
My code:

this.requestEditor = React.createRef()
.......
this.requestEditor.current.editor.removeCommand('find')
.......
<AceEditor
       ref={this.requestEditor}
/>

Can someone please help me?
@yamyamyuo If it has worked for you can you please share the syntax?

zachrispoli added a commit to Wicklets/wick-editor that referenced this issue Nov 12, 2019
@stuartcrobinson
Copy link

@hkedia321 this works for me to remove search (ctrl/cmd-f) from react-ace


  componentDidMount() {
    this.reactAceComponent.editor.commands.removeCommand('find');
    //...
  }

...

  <AceEditor
    ref={refs => { this.reactAceComponent = refs }}
    //...
  />

@dadwic
Copy link

dadwic commented Jan 30, 2021

import "ace-builds/src-noconflict/ext-searchbox";

@ashishkummar
Copy link

ashishkummar commented May 25, 2023

import "ace-builds/src-noconflict/ext-searchbox"; worked in React Js :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants