Configure the Default Editor

Last modified by superadmin on 2026/10/14 10:44

Steps

Choose the editor that opens for wiki content by writing that choice where the resolution chain reads it: the wiki administration, an editor binding object, or xwiki.properties.

The three routes differ in reach and in who can use them, but they store the same pair: a data type with an optional category, and the identifier of an editor. Editors, Data Types and Categories has the values to choose from.

  1. For the whole wiki, let the administration write the binding for you. Open the wiki administration, go to Editing then WYSIWYG Editor, pick the editor under Default WYSIWYG Editor and save:

    The WYSIWYG Editor section of the global administration, under Editing, with CKEditor selected in the Default WYSIWYG Editor drop down list and a Save button below it

    The list offers the editors registered in the wysiwyg category, and its empty entry removes the setting so that the wiki inherits it again. Saving writes an XWiki.EditorBindingClass object on XWiki.XWikiPreferences, for the data type org.xwiki.rendering.syntax.SyntaxContent#wysiwyg, which is exactly what the next step does by hand.

  2. For one user, or for one page and its children, add that object yourself. Edit the page that is to carry the setting with the Object editor, add an object of type XWiki.EditorBindingClass, and fill its two properties:
    PropertyValue in this exampleWhat it is
    Data Typeorg.xwiki.rendering.syntax.SyntaxContent#wysiwygthe data type, followed by the category
    Role Hintckeditorthe identifier of the editor to use for it

    An EditorBindingClass object on the WebPreferences page of the Handbook space, with Data Type set to org.xwiki.rendering.syntax.SyntaxContent number sign wysiwyg and Role Hint set to ckeditor

    The page the object sits on is what decides its reach: a user profile page, the WebPreferences page of a page, or XWiki.XWikiPreferences. Default Editor Resolution says how far each of the three reaches, and which one wins when several apply.

    Warning

    Name the category in Data Type. The visual editor reads org.xwiki.rendering.syntax.SyntaxContent#wysiwyg and the wiki editor reads org.xwiki.rendering.syntax.SyntaxContent#text, while the bare org.xwiki.rendering.syntax.SyntaxContent is read only when the editor is looked up without a category. A binding written in the bare form therefore leaves both the visual and the wiki editor exactly as they were.

  3. For the whole instance, write the binding in xwiki.properties. The file ships four of these keys, none of them for the wysiwyg category, so nothing in it chooses the visual editor until a line is added:
    # edit.defaultEditor.org.xwiki.rendering.syntax.SyntaxContent=text
    # edit.defaultEditor.org.xwiki.rendering.syntax.SyntaxContent#text=text
    # edit.defaultEditor.org.xwiki.rendering.block.XDOM=text
    # edit.defaultEditor.org.xwiki.rendering.block.XDOM#text=text

    Add the line the category needs, uncommented:

    edit.defaultEditor.org.xwiki.rendering.syntax.SyntaxContent#wysiwyg=ckeditor

    This route is the only one of the three that is not editable from the wiki, and it applies to the whole instance.

  4. Check the result where the setting applies: edit a page covered by it, and the editor you chose is the one that opens.

    A page of the Handbook space opened for editing, showing the CKEditor toolbar above the page content

    What is configured for that page, as opposed to what the chain falls back to, is readable from a wiki page in the same scope, and comes back empty when the scope carries no binding of its own:

    {{velocity}}
    $services.edit.syntaxContent.getDefaultEditorId('wysiwyg')
    {{/velocity}}

Related

Get Connected