close

Filter

loading table of contents...

Studio Developer Manual / Version 2310

Table Of Contents

10.3.4 Upgrade Conditional Changes via Studio Plugins

You may have used CoreMedia Studio Plugins to enable or disable rich text editor features in certain contexts. For CKEditor 4, the main use case for this was customizing the editor's toolbar. Have a look at Section 10.2.2.5, “Customizing Rich Text Toolbar” to find out more about how toolbar items could be added or removed by using the addItemsPlugin and removeItemsPlugin.

This way, editor instances could be altered to match the needs of a certain context or a certain user group.

For CKEditor 5 you can achieve the same results by dynamically setting a different editorType and therefore apply a different configuration, or use the newly introduced feature flags feature.

Feature flags come in handy if you want to apply a minor change to multiple of your editor configurations at once. The amount of configurations would otherwise increase rapidly.

See Example 10.54, “CoreMedia Rich Text 1.0 in CoreMedia Studio to get a rough impression on how a Studio plugin that alters RichTextAreas via feature flags would look like.

rules: [
  Config(CKEditor5RichTextArea, {
    plugins: [
      Config(OnlyIf, {
        isAdministrator: true,
        then: Config(
          CKEditor5FeatureFlagPlugin,
          { featureFlags: ["administrative"] }
        ),
      }),
    ],
  }),
],

Example 10.54. CoreMedia Rich Text 1.0 in CoreMedia Studio


Have a look at Section 10.1.3.8, “Using Configuration Feature Flags” to learn more about feature flags, when and how to use them.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.