Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
polem committed Aug 13, 2015
1 parent 7252237 commit 5f3ed08
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Drupal 7 redactor wysiwyg adapter

## Add a redactor plugin

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

```
```php
/**
* Implements hook_redactor_plugins().
*/
Expand All @@ -23,13 +23,26 @@ function my_module_redactor_plugins($editor) {
'css' => array(
$editor['library path'] . '/plugin.css',
),
),
'config' => array(
'param1' => 'value1',
'param2' => 'value2'
),
)
),
);
}
```

## Alter settings in javascript.

```js
(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);
```

0 comments on commit 5f3ed08

Please sign in to comment.