NOTE: TinyMCE 5 reached End of Support in April 2023. No more bug fixes, security updates, or new features will be introduced to TinyMCE 5. We recommend you upgrade to TinyMCE 6 or consider TinyMCE 5 Long Term Support (LTS) if you need more time.
TinyMCE plugin Yeoman generator
How to use the Yeoman generator to bootstrap a new TinyMCE plugin using ES2015/Babel or TypeScript.Contribute to this page
Tiny maintains a Yeoman generator to assist with creating plugins for TinyMCE. The Yeoman Generator will create the files and boilerplate code required for a custom plugin, and sets up some helpful commands.
The plugin generator is built with the project scaffolding tool Yeoman. To get started install both
yo (the yeoman command) and the generator with the following command:
npm install --global yo generator-tinymce
Wait for the install to finish.
Start the generator with the following command:
You will then be guided through these questions:
- Plugin name: The name of the plugin.
- Plugin description (optional): An optional description of the plugin.
- Initialize git repo? Here you can skip the creation of a new repository for the plugin.
- What’s your name? For license.
- Your email (optional): For license.
- Your website (optional): For license.
- Which license do you want to use? Choose the license for the plugin.
Yeoman installs the needed dependencies, and the project is bootstrapped and ready.
cd into the plugin directory and run the following command to start the auto-reloading development server:
Run the following command once you have completed development of the plugin:
dist directory will be created, containing a sub-directory with the same name as the plugin. The sub-directory will contain the following files:
plugin.js- unminified plugin bundle
plugin.min.js- minified and uglified plugin bundle
CHANGELOG.txt- the text file containing your changes
LICENSE.txt- the text file containing your license
version.txt- the text file containing the version of your plugin
yarn build will generate the following output for a plugin named
Thanks for the feedback!
Can't find what you're looking for? Let us know.