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 modeEditing areaRecommended features to be enabledTouch UIClassic UI
InlineIn-place editing for quick, minor edits; Format without opening a dialog boxMinimal RTE featuresYY
RTE full screenCovers entire pageAll the required RTE featuresYN
DialogDialog box on top of the page content but does not cover the entire pageAll the required RTE features in Classic UI; judiciously enable features in Touch UIYY
Dialog full screenSame as Full screen mode; contains fields of the dialog alongside RTEAll the required RTE featuresYN
NOTE
The source-edit feature is not available in inline editing mode in Touch-enabled UI. You cannot drag images in the full screen mode. All other features work in all the modes.

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.

Inline editing with basic toolbar in Touch-enabled UI

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 rte_fullscreen , from the compact toolbar when using the inline editing mode.

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.

The detailed RTE toolbar when editing in full screen mode in Touch-enabled UI

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.

Dialog editing mode in Touch-enabled UI

Figure: Dialog editing mode in Touch-enabled UI

Dialog box in Classic UI that contains detailed toolbar for editing

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 IDfeaturesDescription
editcut copy paste-default paste-plaintext paste-wordhtmlCut, copy and, the three paste modes.
findreplacefind replaceFind and replace.
formatbold italic underlineBasic text formatting.
imageimageBasic image support (drag from content or Content Finder). Depending on the browser, the support has different behaviors for authors
keysTo define this value, see tab size.
justifyjustifyleft justifycenter justifyrightParagraph alignment.
linksmodifylink unlink anchorHyperlinks and anchors.
listsordered unordered indent outdentThis plug-in controls both indentation and lists; including nested lists.
misctoolsspecialchars sourceeditMiscellaneous 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.
ParaformatparaformatThe 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.
spellcheckchecktextLanguage aware spell checker.
stylesstylesSupport 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.
subsuperscriptsubscript superscriptExtensions to the basic formats, adding sub- and super-script.
tabletable removetable insertrow removerow insertcolumn removecolumn cellprops mergecells splitcell selectrow selectcolumnsSee configure table styles, if you want to add your own styles for either entire tables or individual cells.
undoundo redoHistory size of undo and redo operations.
NOTE
The full screen plug-in is not supported in dialog mode. Use of the 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 modeLocation for Touch UILocation for Classic UI
Inlinecq:editConfig/cq:inplaceEditingcq:editConfig/cq:inplaceEditing
Full screencq:editConfig/cq:inplaceEditingNot applicable
Dialogcq:dialogdialog
Full screen dialogcq:dialogNot applicable
NOTE
Do not name the node under 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
Do not name the RTE configuration node as 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) to True, 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 to Trueand 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 to True, to control when to start RTE by triggering the event rte-start.

  • rte-start: Trigger this event on the contenteditable-div of RTE, when to start editing RTE. This works only if customStart 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 on cq: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 on cq: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.

NOTE
The Core Components text component allows template editors to configure many RTE plugins in a GUI as content policies, eliminating the need for technical configuration. Content policies can work with RTE UI configurations as described in this document.
For more information, see the RTE UI settings and content polices section of this document and Creating Page Templates and the Core Components developer documentation.
NOTE
For reference purposes, the default Text components (delivered as part of a standard installation) can be found at:
  • /libs/wcm/foundation/components/text
  • /libs/foundation/components/text
To create your own text component, copy the above component instead of editing these components.