Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to use plugins #31

Open
rubenjimenez opened this issue Dec 23, 2014 · 8 comments
Open

Error when trying to use plugins #31

rubenjimenez opened this issue Dec 23, 2014 · 8 comments

Comments

@rubenjimenez
Copy link

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
Copy link

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

@TylerGarlick
Copy link
Owner

@rubenjimenez Did that work for you?

@danieleratti
Copy link

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
Copy link

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
Copy link

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

@reinhardt
Copy link

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

ReferenceError: RedactorPlugins is not defined

@reinhardt
Copy link

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
Copy link

vishnu-vv commented Apr 21, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants