Search code examples
phpeditorace-editor

Web browser doesn't search total ACE editor


The search functionality(Ctrl+f) of the web browser does not properly work when editing a file in the ace editor. Please check in following link, http://ace.c9.io/#nav=about .

The web browser search functionality(Ctrl+f) does only lookup the text that is currently visible in the editor. The text that is hidden (outside of the visible scroll area) is not being searched.


Solution

  • I found a solution myself....It works

    The ace editor will display the content by line by line, The visible part of the content is only searched by browser remaining lines are hidden from the browser as per the ace editor functionality. In the browser, findbar(ctrl+f) will search only the visible part of the ace editor. So We have planned to implement the separate search bar to the ace editor. when we give crtl+f on the ace editor, the new search bar will open inside the ace editor and it will search the text by the given search text.

    Implementation Steps :

    According to the Ace editor documentation (github.com/ajaxorg/ace), the newest version of the ace editor contain the search functionality (crtl+f ), inside the editor. We can download the newest version of Ace editor library files from the external link, github.com/ajaxorg/ace-builds/. Then downloaded Ace editor library files integrate to cloudrexx(No need to add all files, only add required files to run Ace editor in cloudrexx) We have to update the Ace editor to the newest version 1.1.9. Also we should add the file ext-searchbox.js to /lib/ace/ The in-build file ext-searchbox.js provide the search functionality inside the Ace editor.