Various modes of editing
Authors can create and edit textual content in Experience Manager using the different modes of components. The toolbar options for authoring and formatting content and the user experience of RTE-enabled components in different editing mode varies based on RTE configurations.
Editing mode | Editing area | Recommended features to be enabled | Touch UI | Classic UI |
---|---|---|---|---|
Inline | In-place editing for quick, minor edits; Format without opening a dialog box | Minimal RTE features | Y | Y |
RTE full screen | Covers entire page | All the required RTE features | Y | N |
Dialog | Dialog box on top of the page content but does not cover the entire page | All the required RTE features in Classic UI; judiciously enable features in Touch UI | Y | Y |
Dialog full screen | Same as Full screen mode; contains fields of the dialog alongside RTE | All the required RTE features | Y | N |
Inline editing
When opened (with a slow double-click) the content can be edited within the page. A compact toolbar with very basic options is presented.
Figure: Inline editing with basic toolbar in Touch-enabled UI
In Classic UI, a slow double-click the component allows inline editing and an orange outline highlights the content. If the Content Finder is open, a toolbar with the available RTE formatting options is displayed at the top of the window. If the Content Finder is not open, the formatting options are not displayed and you can do basic text edits only.
Full screen editing
Experience Manager components can be opened in full screen view that hides the page content and occupies the available screen. Consider full screen editing a detailed version of the inline editing as it offers the most editing options. It can be opened by clicking
In the dialog full screen mode, along with a detailed RTE toolbar, the options and components available in a dialog are also available. It is applicable only for a dialog that contains RTE alongside other components.
Figure: The detailed RTE toolbar when editing in full screen mode in Touch-enabled UI
Dialog editing
When a component is double-clicked a dialog box opens for editing the contents. The dialog box opens on top of the existing page. In some specific scenarios, the dialog opens as a pop-up window. For example, when a Text component is part of a column in a multi-column page layout and the area available for the dialog is less.
Figure: Dialog editing mode in Touch-enabled UI
Figure: Dialog box in Classic UI that contains detailed toolbar for editing
About RTE plug-ins and the associated features
The functionality is made available via a series of plug-ins, each with:
-
A
features
property:- Used to activate, or deactivate, basic functionality for that plug-in
- That can be configured using a standardized procedure
-
Where appropriate, additional properties and options requiring specialized configuration.
Basic features of the RTE are activated, or deactivated, by the value of the features
property on a node specific to the appropriate plug-in.
The following table lists the current plug-ins, showing:
- Plug-in IDs with a link to API documentation. ID is used as the node name when activating a plug-in.
- Permitted values for the
features
property. - A description of the functionality provided by the plug-in.
Plug-in ID | features | Description |
---|---|---|
edit | cut copy paste-default paste-plaintext paste-wordhtml | Cut, copy and, the three paste modes. |
findreplace | find replace | Find and replace. |
format | bold italic underline | Basic text formatting. |
image | image | Basic image support (drag from content or Content Finder). Depending on the browser, the support has different behaviors for authors |
keys | To define this value, see tab size. | |
justify | justifyleft justifycenter justifyright | Paragraph alignment. |
links | modifylink unlink anchor | Hyperlinks and anchors. |
lists | ordered unordered indent outdent | This plug-in controls both indentation and lists; including nested lists. |
misctools | specialchars sourceedit | Miscellaneous tools allow authors to enter special characters or edit the HTML source. Also, you can add a whole range of special characters if you want to define your own list. |
Paraformat | paraformat | The default paragraph formats are Paragraph, Heading 1, Heading 2, and Heading 3 (<p> , <h1> , <h2> , and <h3> ). You can add more paragraph formats or extend the list. |
spellcheck | checktext | Language aware spell checker. |
styles | styles | Support for styling using a CSS class. Add new text styles if you want to add (or extend) your own range of styles for use with text. |
subsuperscript | subscript superscript | Extensions to the basic formats, adding sub- and super-script. |
table | table removetable insertrow removerow insertcolumn removecolumn cellprops mergecells splitcell selectrow selectcolumns | See configure table styles, if you want to add your own styles for either entire tables or individual cells. |
undo | undo redo | History size of undo and redo operations. |
dialogFullScreen
setting to configure the toolbar for full screen mode.Understand the configuration paths and locations
The mode of RTE editing (and the UI) that you provide for your authors decide the location for the configuration details when you are activating the RTE plug-ins:
Editing mode | Location for Touch UI | Location for Classic UI |
---|---|---|
Inline | cq:editConfig/cq:inplaceEditing | cq:editConfig/cq:inplaceEditing |
Full screen | cq:editConfig/cq:inplaceEditing | Not applicable |
Dialog | cq:dialog | dialog |
Full screen dialog | cq:dialog | Not applicable |
cq:inplaceEditing
as config
. On cq:inplaceEditing
node, define the following properties:- Name:
configPath
- Type:
String
- Value: path of the node containing the actual configuration
config
. Otherwise, the RTE configurations take effect for only the administrators and not for the users in the group content-author
.Configure the following properties that apply in Dialog editing mode in Touch UI only:
-
useFixedInlineToolbar
: Set this Boolean property defined on the RTE node (one with sling:resourceType=cq/gui/components/authoring/dialog/richtext
) toTrue
, to make RTE toolbar fixed instead of floating.When this property is true, Richtext editing is, by default, started on the “foundation-contentloaded” event.
To prevent this, set the property
customStart
toTrue
and trigger the ‘rte-start’ event to start RTE editing. When this property is ‘true’, the default behavior, rte start on click, does not work. -
customStart
: Set this Boolean property defined on the RTE node toTrue
, to control when to start RTE by triggering the eventrte-start
. -
rte-start
: Trigger this event on thecontenteditable-div
of RTE, when to start editing RTE. This works only ifcustomStart
has been set to true.
When RTE is used in the touch-enabled dialog, setting the property useFixedInlineToolbar
to true is mandatory to avoid issues.
Customizing in place editing
You can define on which HTML selector the text editor starts by configuring the following properties:
editElementQuery
- Defined oncq:InplaceEditingConfig
, this property is used to specify a selector of the HTML element on which the inline-editing for the Text Component will be started. If not specified, the inline-editing is directly started on the Text Component HTML.textPropertyName
- Defined oncq:InplaceEditingConfig
, this property is used to specify the name of the property that will be saved on the content node where the HTML value of the text component will be persisted after inline-editing.
The corresponding property for dialog mode is name
.
Enable RTE functionalities by activating plug-ins
RTE functionalities are made available via a series of plug-ins, each with features property. You can configure the features property to enable or disable the various features of each plug-in.
For detailed configurations of the RTE plug-ins, see how to activate and configure the RTE plug-ins.
Sample: Download this sample configuration that illustrates how to configure RTE. In this package all the features are enabled.
/libs/wcm/foundation/components/text
/libs/foundation/components/text