The <cms:editable> tag

This tag enables the direct edit feature in a page. Furthermore, it provides the JavaScript/CSS code which is neccessary for the direct edit button.


Name Description Required
provider This value specifies the fully qualified name of a class implementing the OpenCms interface for direct edit providers.
This class is used to generate the direct edit HTML fragments (i.e. the "direct edit button").
Currently available classes:
file This value specifies a file containing the fragments inserted at the position of the editable tag.
If not specified, the system default fragments are used.
mode This value specifies the mode for inserting the direct edit buttons/links:
  • auto / true (default): Enables the generation of a direct edit button/link in the page and inserts the fragments at the position of the tag
  • manual: Inserts the direct edit button at the position of the tag
  • false: Disables the generation of a direct edit button/link in the page


This tag has no body content!

Example usage:

Enables the direct edit feature and includes the body element from a file which will be editable directly:

<cms:editable />

<cms:include file="demo_01.html" element="body" editable="true" />

Enables the direct edit feature with textual links and shows a list of xml contents with the direkt edit link placed manually:

<cms:editable provider="org.opencms.workplace.editors.directedit.CmsDirectEditTextButtonProvider"/>

<cms:contentload collector="..." ... editable="manual">
Edit this: <cms:editable mode="manual"/>

For further examples, look into examples_directedit.