Skip to content

polem/redactor_wysiwyg

Repository files navigation

redactor

Drupal 7 redactor wysiwyg adapter

Add a redactor plugin

You have to implement hook_redactor_plugins css and js files will be loaded by the module

/**
 * Implements hook_redactor_plugins().
 */
function my_module_redactor_plugins($editor) {

  return array(
    'my_plugin_id' => array(
      'name' => 'My plugin',
      'files' => array(
        'js' => array(
          $editor['library path'] . '/plugin.js',
        ),
        'css' => array(
          $editor['library path'] . '/plugin.css',
        ),
      )
    ),
  );
}

Editor settings

You can activate or disable plugins in wysiwyg profiles

plugins settings

File manager

to enable filemanager drush en redactor_filemanager

you can now edit file manager settings in wysiwyg profiles

File manager settings

Image manager

to enable imagemanager drush en redactor_imagemanager

you can now edit image manager settings in wysiwyg profiles

Image manager settings

Alter settings in javascript.

(function($) {
  'use strict';
  Drupal.behaviors.my_redactor_module = {
    attach: function(context, settings) {

      $(document).bind('redactor.attach', function(e, context, params, settings) {
        settings.linkifyCallback = function(elements) {
        };
      });
    }
  };
})(jQuery);

About

Drupal 7 redactor wysiwyg adapter

Resources

License

Stars

Watchers

Forks

Packages

No packages published