TinyMCE Field Type for Statamic
Add TinyMCE v5 wysiwyg as a Statamic field type.
Installation
- Unzip and move this folder to
site/addons/
- That's it. You're done.
Configuration
Essentially all of TinyMCE's configuration options for tinymce.init()
are supported in the configuration - TinyMCE v5 docs.
NOTE: To use additional plugins, they need to be bundled, so you'll have to do more work (see "Adding Plugins and Development").
- You can customize options using the addon > settings interface or directly editing
site/settings/addons/tiny_mce_wysiwyg.yaml
Adding Plugins and Development
You'll need yarn
installed globally.
- From the addon folder, run
yarn install
- If you need additional TinyMCE plugins, you'll have to:
- Add
import
statements inresources/assets/src/tinymce.js
for the plugins you want. - Be sure to include them in your settings
plugins
array and toolbar locations as desired.
- Add
Build commands
yarn watch
- Build (dev) and watchyarn build
- Build (dev)yarn build:prod
- Build (production)