Under the hood, the Page Builder Text content type uses the TinyMCE WYSIWYG HTML Editor. In this example, we show you how to:
- Add and remove buttons from the TinyMCE toolbar
- Integrate your theme's typography into the TinyMCE Formats selector
- Add the TinyMCE code plugin (< >) to the toolbar so you can view the HTML code directly.
Text content type showing theme styles
These steps assume you have already cloned the pagebuilder-examples
repo to the root of your Magento instance, as described in Installing the example modules:
-
Navigate to to the
app/code/
directory and create a symlink using the following command:ln -s ../../pagebuilder-examples/Text
-
From the Magento root directory, run the
setup:upgrade
command to install and enable the module:bin/magento setup:upgrade
-
Navigate to a CMS page, drag a
Text
content type onto the Admin stage, and click the Formats selector in the toolbar to see your theme styles displayed. -
Enter some text, then click the
code
button (< >) in the toolbar to view the HTML.
Bruce Denham. Contact us on the Slack #pagebuilder channel for questions specific to this example.
We encourage and welcome you to help us keep these examples current by submitting Issues and Pull Requests. We also welcome your feedback and ideas on other code examples you would like to see added to this repo.