kbrabrand / craft-tinymce
Edit rich text content in Craft CMS using the TinyMCE editor.
Installs: 230
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0-RC15
- tinymce/tinymce: ^4.8.5
This package is auto-updated.
Last update: 2024-10-16 03:01:48 UTC
README
This plugin adds a TinyMCE field type to Craft CMS, which provides a rich text editor powered by TinyMCE (v4).
Requirements
This plugin requires Craft CMS 3.0.0-RC15 or later.
Installation
You can install this plugin with Composer.
With Composer
Open your terminal and run the following commands:
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require kbrabrand/craft-tinymce # tell Craft to install the plugin ./craft install/plugin tinymce
Configuration
TinyMCE config
You can creaete custom TinyMCE configs that will be available to your TinyMCE fields. They should be created as JSON files in your config/tinymce/
folder. The options are the ones you find in the TinyMCE documentation – with two exceptions: the theme will be set to modern, and the selector to the id of the field rendered by Craft.
{ "menubar": false, "plugins": ["autoresize", "link", "code", "table contextmenu paste help"], "toolbar": "bold italic | alignleft aligncenter alignright alignjustify | removeformat | table", "table_class_list": [ {"title": "None", "value": ""}, {"title": "Dog", "value": "dog"}, {"title": "Cat", "value": "cat"} ] }
HTML Purifier Configs
You can create custom HTML Purifier configs that will be available to your TinyMCE fields. They should be created as JSON files in your config/htmlpurifier/
folder.
See the HTML Purifier documentation for a list of available config options.