5.7.4 - Has anyone been able to register a Redactor plugin?

I have unsuccessfully attempted to register a Redactor plugin by using this example.

Here are the paths I used for the package:

The plugin package can be installed and enabled in the new Rich Text Editor settings page (Dashboard > System & Settings > Basics > Rich Text Editor), but prevents Redactor from loading.

The Redactor plugin is called clips.js and is supplied by the maker of Redactor as an example. When manually added to concrete5 (with the addition of this.lang.get() and setAwesome()) the plugin works as expected. It is unmodified, except for two changes.

Original clips.js
var button = this.button.add('clips', 'Clips');
this.button.addCallback(button, this.clips.show);

Modified to work with concrete5
var button = this.button.add("clips-button", this.lang.get("insert_clips"));
this.button.setAwesome("clips-button", "fa-clipboard");

I am attaching the plugin so others might see where I am making an error.

1 Attachment

View Replies: View Best Answer
csebe replied on at Permalink Reply
Andrew said in the original post: "Note: this requires concrete 5.7.4 (and it's just been added so it's not part of the release candidate) ".

I assume you're working with RC2?
MrKDilkington replied on at Permalink Reply
I am using version 5.7.4.
AndyJ replied on at Permalink Best Answer Reply
if you structure like so


I think you'll find it works.
You need to discard /editor/plugin/clips and move your js and css directories into the root of your package.
MrKDilkington replied on at Permalink Reply
Thank you, that structure worked.

Also, for anyone else reading this in the future, you do not need "this.lang.get()" for the tooltip names.

The only thing concrete5 needs to get it running is setAwesome() which sets the Font Awesome icon in the toolbar.
AndyJ replied on at Permalink Reply
by the way - thanks for the plugin. I'm just using it to add placeholder text to a demo site. It's come in very handy...
MrKDilkington replied on at Permalink Reply
For you, or anyone else, making plugins.

Here are some example plugins I've found. Even if the plugin function itself isn't what you want, I find seeing how they were built very useful.


There don't seem to be a ton of Redactor 10 plugins around.