You register new editors with your Experience Manager application
by adding your custom editor to the editor registry of the application. The
registry is located in the
<app dir>/config/import/editors
directory.
When you complete your custom editor, you must place it in the
<app dir>/config/import/editors
directory in
a folder with the custom editor's name. For example, if you want to register a
custom editor named TextAreaEditor, then you must create a folder named
<app
dir>/config/import/editors/TextAreaEditor
. Place a JSON file the
with the
ecr:type
of
editor in this folder. If a custom editor needs any
configuration, that can be specified in the JSON file, too. The folder must
also contain the following files:
If the custom editor has the same name as an existing editor in your application, you can create a unique namespace for your custom editor, see Overriding an existing editor with a custom editor.
To register a custom editor:
Run the following command to export the editor registry of your deployed application:
runcommand.bat|sh IFCR exportContent editors <directory>
, where<directory>
indicates the directory on the file system to which the editors registry should be exported.For example:
runcommand.bat IFCR exportContent editors D:\backup\editors
Navigate to the directory where you exported the editor registry.
For example:
D:\backup\editors
Create a folder for your custom editor. Remember the folder must have the custom editor's name.
For example:
D:\backup\editors\TextAreaEditor
Add a JSON file,
_.JSON
with your editor's configuration to the folder. Theecr:type
must be editor;config
is optional.For example:
{ "ecr:type":"editor", }
Add the
editor.js
andeditor.html
files for your editor to the folder.Run the following command to import the updated editor registry of your deployed application:
runcommand.bat|sh IFCR importContent editors <directory>
, where<directory>
indicates the directory on the file system from which editors registry should be imported.For example:
runcommand.bat IFCR importContent editors D:\backup\editors