TylerGarlick / angular-redactor

Redactor WYSIWYG directives for redactor editor
MIT License
208 stars 83 forks source link

Error when trying to use plugins #31

Open rubenjimenez opened 9 years ago

rubenjimenez commented 9 years ago

Hi,

I'm trying to load the fullscreen plugin and I'm getting this error:

"ReferenceError: RedactorPlugins is not defined"

This is my code to initialize Redactor:

// Combined modules
angular.module('mean', modules).config(function(redactorOptions) {

//
// Redactor WYSIWYG editor
//

redactorOptions.focus = true;
redactorOptions.lang = 'es';
redactorOptions.plugins = ['fullscreen'];

});

Where do i suppose to define RedactorPlugins? Or at least, what should i modify to make Redactor to accept plugins?

Thanks in advance!

carlosCeron commented 9 years ago

add plugin libray both .js and css on index, after redactor library,

TylerGarlick commented 9 years ago

@rubenjimenez Did that work for you?

danieleratti commented 9 years ago

I have the same problem here. I just tried to add "plugins: ['video']" in the redactor options and I'm getting:

ReferenceError: RedactorPlugins is not defined

I noticed that even if I just put plugins: [](empty array) I still get it.

How can we resolve?

Thanks for your contribution.

danieleratti commented 9 years ago

Not sure is the best way but I managed to get it working just by editing each plugin in this way:

Replace

(function($)
{
    $.Redactor.prototype.XXX = function()

with:

if (!RedactorPlugins) var RedactorPlugins = {};

(function($)
{
    RedactorPlugins.XXX = function()
aligajani commented 9 years ago

Video appears, but @DanieleRatti , fullscreen and imagemanager won't appear. No errors in console either.

reinhardt commented 8 years ago

Same issue here. Added the video plugin, and added 'video' to the plugins list in the options. Result:

ReferenceError: RedactorPlugins is not defined

reinhardt commented 8 years ago

Whoops, I'm in the wrong repo. Sorry guys. I'm not even using the angular directive - but maybe that's a hint that it's a more general issue...

vishnu-vv commented 7 years ago

I cannot integrate fontcolor plugin in my app

//= require fontcolor
//= require angular-redactor
  $scope.redactorOptions = {minHeight: 250,
    replaceDivs: false,
    paragraphize: false,
    allowedTags: ['p', 'h1', 'h2', 'h3', 'h4', 'html', 'head', 'script', 'body',
    'table', 'th', 'tr', 'td', 'thead', 'tbody', 'div', 'img', 'a', 'document', 'meta'],
    plugins: ['fontcolor']
  }
%textarea.form-control{"ng-model":"settings.bar_button.text.content",
 placeholder:"Enter image text", "redactor": "{buttonsHide:['HTML'],minHeight:180}",rows:60}

The plugin fontcolor does not appear in the HTML editor.