This plugin allow you to insert Vimeo videos using embed code or just the video URL.
npm install ckeditor-vimeo-plugin
Add the plugin to CKEditor (config.js):
CKEDITOR.plugins.addExternal('vimeo', '../node_modules/ckeditor-vimeo-plugin/vimeo/'); config.extraPlugins = 'vimeo';
You may need to adjust the plugin path. The example is assuming that you have the following directory structure:
project └───ckeditor │ └───config.js └───node_modules └───ckeditor-vimeo-plugin
Follow these steps:
Download the latest version of the plugin from Github.
Extract the downloaded file into the CKEditor's plugins folder.
Enable the plugin by changing or adding the extraPlugins line in your configuration (config.js):
config.extraPlugins = 'vimeo';
The default options can be overriden on config.js.
- Video width
config.vimeo_width = '640';
- Video height
config.vimeo_height = '480';
- Make responsive (ignore width and height, fit to width):
config.vimeo_responsive = true;
- Start video automatically
config.vimeo_autoplay = false;
- Disable the change of settings
The elements on the list will be disabled (but still visible).
config.vimeo_disabled_fields = ['txtEmbed', 'chkAutoplay'];
See the available element list below.
- txtEmbed
- txtUrl
- txtWidth
- txtHeight
- chkResponsive
- chkAutoplay
If everything is ok, a Vimeo icon should appear on the CKEditor toolbar. Click it, paste your embed code or video URL and the video will be inserted.
This project has been started and modified from original project ckeditor-youtube-plugin version 2.1.10 from Jonnas Fonini.
monstrao for portuguese brazilian translations.
And it is licensed under the WTFPL to respect original project license.