In TinyMCE, CK Editor and FCK Editor, there is a template function, which allows a user to select a HTML template from a drop-down and insert it into the WYSIWYG text-area. This module supports those features for use with the WYSIWYG API.
Note for Drupal 8 and installation via composer
In order to allow composer to find a required library from CKEditor, you have to add something like this to the root composer.json of your project before you download and install this module:
{
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "package",
"package": {
"name": "ckeditor/templates",
"type": "drupal-library",
"version": "4.11.1",
"dist": {
"type": "zip",
"url": "https://download.ckeditor.com/templates/releases/templates_4.11.1.zip",
"reference": "master"
}
}
}
]
}
Note for CKEditor 4.x users
Due to major changes in the API of CKEditor 4.x there are a few things no longer working which is not a limitation of the Wysiwyg Template module and can't be addressed here. The good news: the Wysiwyg module is dealing with those changes and as of March 2014 it is confirmed that the latest 7.x-2.x-dev release and their soon to be released 7.x-2.3 version are working just fine with CKEditor 4.3.3 and later. Note: You have to use the full version of the CKEditor, not the standard version (or at least include their template plugin if you custom build your CKEditor).
Note for CKEditor 5 and Drupal 10
CKEditor 5 brings significant changes and integrations need to be changed significantly or sometimes even be rewritten from scratch. As a vast majority of wysiwyg_template users are still on Drupal 7, we are uncertain if we should even consider working on any migration.
Even more so, there are plenty of template integrations around CKEditor 5 lately, and it would probably better to join forces and only have a single one in the future. For details see #3264254: Drupal 10 and ckeditor5 compatibility where you may also comment your own point of view.
Dependencies
* Wysiwyg API
* or in 7.x-2.10, CK Editor
Installation
* Install as usual, see http://drupal.org/node/70151 for further information.
* Go to Administer > Site configuration > Wysiwyg
- click "edit" to set up your editor profile
- under "Buttons and Plugins" you'll see "Insert Templates" as a new option
Configuration
* Administer > Site configuration > Wysiwyg > Add Template to create a new template.
* Administer > Site configuration > Wysiwyg > List Templates to manage your existing templates.
Credit
Originally written by Jen Lampton.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Administration Tools, Content Editing Experience, Integrations
- 6,785 sites report using this module
- Created by jenlampton on , updated
- Drupal 10 is here!
Not sure, if this module should be migrated to Drupal 10 and CKEditor 5, see notes above.
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.