Skip to content

Instantly share code, notes, and snippets.

@segovia94
Last active August 29, 2015 14:15
Show Gist options
  • Save segovia94/5ddd6df0d799e2e9f032 to your computer and use it in GitHub Desktop.
Save segovia94/5ddd6df0d799e2e9f032 to your computer and use it in GitHub Desktop.
Add ckeditor autosave plugin to drupal ckeditor module
<?php
// Create a "plugins" directory in the gs_wysiwyg module and add the ckeditor autosave plugin to it.
// Then add the following code into the gs_wysiwyg.module file
/**
* Implements hook_ckeditor_plugin().
*/
function gs_wysiwyg_ckeditor_plugin() {
$plugin_path = drupal_get_path('module', 'gs_wysiwyg') . '/plugins/';
return array(
//autosave to localstorage
'autosave' => array(
'name' => 'autosave',
'desc' => t('This Plugin autosaves to local storage. See !addon page for more details.', array('!addon' => l(t('addon'), 'http://ckeditor.com/addon/autosave'))),
'path' => $plugin_path . 'autosave/',
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment