Using an Editor Config Contributor Client Extension

Editor Config Contributor YAML Configuration Reference

Liferay DXP 2026.Q1+

You can define an Editor Config Contributor client extension with a client-extension.yaml file.

Usage Details

This client-extension.yaml example defines an Editor Config Contributor extension definition:

assemble:
    -   from: build
        into: static
liferay-sample-editor-config-contributor-2:
    editorConfigKeys:
        -   sampleReactCKEditor5ClassicEditor
    name: Liferay Sample Editor Config Contributor 2
    type: editorConfigContributor
    url: index.js

An Editor Config Contributor client extension contributes a new editor configuration alongside Liferay’s own. Its editorConfigKeys, editorNames, and portletNames properties must match the editor you want to configure. The editor config keys specify which editors your client extension configures. If you do not specify an editor config key, Liferay applies the client extension to all WYSIWYG editors in Liferay.

Client extensions are deployed at the instance level and impact all CKEditor instances across pages within that virtual instance if they meet the configuration criteria.

Tip

By specifying configuration options, you can control which CKEditor instances your extensions affect. If you omit specific configuration options, the extension applies to all CKEditor instances filtered by the provided criteria. If no options are specified, the extension applies to every CKEditor instance in the DXP environment.

The required url property points to a JavaScript file implementing the TypeScript interfaces that the @liferay/js-api npm package (version 0.8.0) publishes under its editor subpath.

The sample workspace’s liferay-sample-editor-config-contributor-2 project is a complete Editor Config Contributor client extension.

Important

Developers must provide valid configurations when implementing the client extension. The system does not perform any validation checks on these configurations.

YAML Properties

These properties are specific to Editor Config Contributor client extensions:

NameData TypeDescription
editorConfigKeysSet<String>Specifies the keys related to the editor configurations that this client extension overrides or contributes to. Using no keys applies it to all WYSIWYG editors.
editorNamesSet<String>Limits the client extension to the named editors. Using no editor names applies it to all of them.
nameStringThe name of the client extension.
portletNamesSet<String>Limits the client extension to editors in the named portlets. Using no portlet names applies it to all of them.
typeStringIndicates the type of client extension. For an Editor Config Contributor, the value is editorConfigContributor.
urlURL(Required) The path to the JavaScript snippet that implements the functionality of the Editor Config Contributor client extension.

See Frontend Client Extension Properties for properties common to all frontend client extensions.