diff --git a/README.txt b/README.txt index cee0629..7426e65 100644 --- a/README.txt +++ b/README.txt @@ -22,6 +22,9 @@ processed after that filter. To enable WYSIWYG support, go to the WYSIWYG settings for each input format and enable the Video Filter button. +To enable CKEditor (standalone) support, please see plugin instructions in: +editors/ckeditor/README.txt + ========= Usage ========= Single video: [video:url] diff --git a/editors/ckeditor/README.txt b/editors/ckeditor/README.txt index 6f21e91..e6f66b0 100644 --- a/editors/ckeditor/README.txt +++ b/editors/ckeditor/README.txt @@ -1,35 +1,16 @@ -############################################## -## ONLY if you use ckeditor WITHOUT wysiwyg ## -############################################## +############################################################ +## ONLY if with the CKEditor module, *NOT* WYSIWYG module ## +############################################################ Installation: Do the following steps to add video_filter button to the CKEditor toolbar: - 1. Open ckeditor.config.js (in the ckeditor module root) + 1. Go to Configuration -> CKEditor (admin/config/content/ckeditor) + Click "Edit" on the profile you what to use with the video filter. - 2. Scroll down to the end of the file, right before "};" insert: + 2. Expand "Editor appearance" and go to "Toolbar". Drag the new video_filter + button from the "All Buttons" toolbar to the "Used Buttons" toolbar. - // Video_filter plugin. - config.extraPlugins += (config.extraPlugins ? ',video_filter' : 'video_filter' ); - CKEDITOR.plugins.addExternal('video_filter', Drupal.settings.basePath + Drupal.settings.video_filter.modulepath + '/editors/ckeditor/'); - - 3. Add button to the toolbar. - - 3.1 Go to Configuration -> CKEditor (admin/config/content/ckeditor) - Click "Edit" on the profile you what to use with Linkit. - - 3.2 Expand "Editor appearance" and go to "Toolbar". - - The button name is: video_filter - For example if you have a toolbar with an array of buttons defined as - follows: - - ['Bold','Italic'] - - simply add the button somewhere in the array: - - ['Bold','Italic','video_filter'] - - (remember the single quotes). + 3. Go to "Plugins" on the same page. Enable the video filter plugin. diff --git a/video_filter.module b/video_filter.module index a0487c8..fb2cf5f 100644 --- a/video_filter.module +++ b/video_filter.module @@ -533,6 +533,25 @@ function _video_filter_form() { return $form; } +/** + * Implements hook_ckeditor_plugin(). + */ +function video_filter_ckeditor_plugin() { + $plugins = array(); + $plugins['video_filter'] = array( + 'name' => 'video_filter', + 'desc' => t('Plugin to directly embed videos with the video filter module.'), + 'path' => drupal_get_path('module', 'video_filter') . '/editors/ckeditor/', + 'buttons' => array( + 'video_filter' => array( + 'label' => t('Video filter'), + 'icon' => 'video_filter.png', + ), + ), + ); + return $plugins; +} + function video_filter_wysiwyg_plugin($editor, $version) { _video_filter_add_settings('wysiwyg_' . $editor);