You can configure your rich text editors to control which text and image formatting tools are available in the WYSIWYG toolbar, the upload paths or filenames for any assets uploaded through an editor, and how CloudCannon should handle custom markup.
There are multiple ways to configure your rich text editors, depending on which editor you want to configure: the Content Editor, editable regions in the Visual Editor, or Rich Text inputs.
For a complete list of options available for rich text editors, please read our rich text editor reference.
The Content Editor#
To configure your Content Editor:
- Navigate to your global configuration file and open it in the Source Editor.
- Identify the
_editables
key, or create one at the top level of your configuration file. - Add the
content
key under_editables
. - Add any keys you want to configure under the
content
key. - Save your changes to the global configuration file.
Let's walk through an example. We want to allow our team members to be able to apply bold, italic, and underline formatting to text in the Content Editor. The global configuration file should look like this:
Configure the Content Editor and all editable regions under the _editables
key anywhere in the configuration cascade.
Configuration options for the Content Editor are nested keys under content
. As soon as you define one key, CloudCannon will interpret any omitted keys as false and disable those options.
Configure the Content Editor and all editable regions under the _editables
key anywhere in the configuration cascade.
Configuration options for the Content Editor are nested keys under content
. As soon as you define one key, CloudCannon will interpret any omitted keys as false and disable those options.
Rich Text inputs#
To configure your Rich Text inputs:
- Navigate to your global configuration file and open it in the Source Editor.
- Identify the
_inputs
key, or create one at the top level of your configuration file. - Enter the key name for your input under the
_inputs
key. - Add the
options
key under your input name. - Add any keys you want to configure under the
options
key. - Save your changes to the global configuration file.
Configure a Rich Text input under the _inputs
key anywhere in the configuration cascade.
Enter the key name of the input here. In this example, the input name is example
.
This input is an HTML Rich Text input. For more information, please read our documentation on Rich Text inputs.
Configuration options for the Rich Text inputs are nested keys under options
.
Configure a Rich Text input under the _inputs
key anywhere in the configuration cascade.
Enter the key name of the input here. In this example, the input name is example
.
This input is an HTML Rich Text input. For more information, please read our documentation on Rich Text inputs.
Configuration options for the Rich Text inputs are nested keys under options
.
Editable regions#
There are four types of editable regions in the Visual Editor:
text
for inline editable regions (e.g.<p>
or<h1>
)block
for block editable regions (e.g.<div>
or<section>
)link
for inline editable regions on<a>
tagsimage
for image editable regions (i.e.<img>
)
To configure your editable regions:
- Navigate to your global configuration file and open it in the Source Editor.
- Identify the
_editables
key, or create one at the top level of your configuration file. - Add the key for the type of editable region under
_editables
(i.e.,text
,block
,link
, orimage
). - Add any keys you want to configure under the editable region key.
- Save your changes to the global configuration file.
Configure the Content Editor and all editable regions under the _editables
key anywhere in the configuration cascade.
Configuration options for the text editable regions are nested keys under text
.
Configuration options for the block editable regions are nested keys under block
.
Configuration options for the link editable regions are nested keys under link
.
Configuration options for the image editable regions are nested keys under image
.
Configure the Content Editor and all editable regions under the _editables
key anywhere in the configuration cascade.
Configuration options for the text editable regions are nested keys under text
.
Configuration options for the block editable regions are nested keys under block
.
Configuration options for the link editable regions are nested keys under link
.
Configuration options for the image editable regions are nested keys under image
.
Alternatively, you can configure options directly on the element with a JSON value in the data-cms-options
attribute.