You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/guides/v2.3/ui_comp_guide/components/wysiwyg/configure-tinymce-editor.md
+129-6Lines changed: 129 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,62 @@ subgroup: howtos
3
3
group: ui-components-guide
4
4
title: Configure the TinyMCE editor
5
5
---
6
+
6
7
You can extend and fully customize the TinyMCE editor to match the style and look-and-feel of your custom theme.
7
-
This enables richer content editing capabilities and ensures that content created in the Page Builder <spanterm-uuid="98cf4fd5-59b6-4610-9c1f-b84c8c0abd97"class="glossary-term"data-toggle="popover">WYSIWYG</span> is seamlessly integrated and consistent with your other content.
8
+
This enables richer content editing capabilities and ensures that content created in the Page Builder WYSIWYG or CMS content is seamlessly integrated and consistent with your other content.
9
+
10
+
The configuration of the TinyMCE editor is built by the `CompositeConfigProvider` class.
11
+
`CompositeConfigProvider` loads the required configuration by adapters specified in the admin configuration `General > Content Management >WYSIWYG Options > WYSIWYG Editor`. This class is the configuration provider and aggregates the data in the array.
12
+
For example, `Magento\Cms\Model\Wysiwyg\CompositeConfigProvider` of Magento_Cms module:
The `DefaultConfigProvider` class returns the data required to render the TinyMCE editor.
56
+
From the example, the class `Magento\PageBuilder\Model\Wysiwyg\DefaultConfigProvider` overrides the existing configuration provided by the `Magento_CMS` module.
10
57
11
-
Revise the `di.xml` file, adding the configuration settings as an argument to `Magento\PageBuilder\Model\Wysiwyg\DefaultConfigProvider`, to customize the TinyMCE editor present in Page Builder.
58
+
## Extending the TinyMCE editor
12
59
13
-
The following code shows an example of configuration settings in the `di.xml` file that determine the font sizes available for selection and add a paragraph menu option associated with the `<p>` tag:
60
+
To customize the TinyMCE editor present in Page Builder, revise the `di.xml` file, adding the configuration settings as an argument to `Magento\PageBuilder\Model\Wysiwyg\DefaultConfigProvider`.
61
+
The following code is an example of the configuration settings in the `di.xml` file that determine the font sizes available for selection. Then, it adds a paragraph menu option associated with the `<p>` tag:
In this case, the `Magento\Cms\Model\Wysiwyg\Gallery\DefaultConfigProvider` class enables the image plugin.
131
+
See a list of available TinyMCE settings on their [website](https://www.tinymce.com/docs/configure/).
132
+
133
+
The following example shows how you can extend the TinyMCE editor configuration by creating a plugin for `DefaultConfigProvider` which extends the `getConfig()` method of the original class.
0 commit comments