Search from FCKEditor Server Browser
- A custom Page implementation that overrides the default setting of config:/modules/adminInterface/pages/linkBrowser. Best to export this and include as part of your module bootstrap resource.
- A subclass of AbstractSimpleSearchList that implements the server side search.
- JS class for displaying the search results list and handling selection.
- If using your own workspace (or repository in Magnolia parlance) you will also need to configure the repository to be browsable and accessible. Export and make part of module bootstrap.
- Add your workspace to config:/modules/fckEditor/config/browsableRepositories.
- Add a base path mapping to access your workspace in config:/server/URI2RepositoryMapping/mappings
- Allow access to your repository by the anonymous role.
Screen Captures
The following screen captures illustrates the changes to the FCKEditor server browser window.

The initial respository browser window when a searchable workspace is selected (indicated by the “Books” value in the “Content” select list control at the top).

The search results list view from which the desired node may be selected, or a fresh search initiated. In this case the list view displays all matching book titles with the word “weather” in it.

The link to the node that is returned to the FCKEditor link dialog box.
Implementation
The following source files were used to implement the custom repository browser implementation:
- Page.java abstract base class that extends the Magnolia TemplatedMVCHandler.
- RepositoryBrowser.java implementation of the Page class.
- RepositoryBrowser.html page that presents the UI for the repository browser implementation tied to FCKEditor. In our project this file is stored under the
/config/resources/ucp/books/cms/page directory. Note that you may have to download the linked file and view the raw source for this file. - AbstractSearchList.java base class that extends the Magnolia AbstractSimpleSearchList class.
- AbstractSelectList.java base class that extends AbstractSearchList class and serves as the base class for all select list implementations that are used to provide search interfaces to the FCKEditor browser.
- BookSelect.java implementation of the AbstractSelectList class.
- BookSelect.js JavaScript file that implements the UI controls for the repository browser search results page. In our project this file is stored under the
/config/resources/mgnl-resources/js-classes/ucp/books directory.