Adding custom Redactor Buttons

Permalink
Hi

I was hoping someone could tell me how I could a custom redactor button to the toolbar when editing? I basically want a button that triggers a popup so the user can enter two fields for a quote and a citation for that quote so that I can then properly format with my own HTML.

I have found the following documentation on how to add a button:

https://imperavi.com/redactor/docs/how-to-add-button/...

But I am not sure how to implement that within Concrete's implementation of redactor, is there a folder somewhere that I need to add the files too in order for redactor to read it?

If I can get that part covered, I am sure I can figure out the rest.

Many thanks
David

bvcreative
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi bvcreative,

You can create a Redactor plugin to do this, but there are a few things to consider before attempting it. The upcoming concrete5 version 8 will be using CKEditor as the primary rich text editor and not Redactor. The Redactor documentation on imperavi.com is for Redactor 2. The version of Redactor concrete5 uses is Redactor 1. Redactor 1 is still officially supported by Imperavi, but they have removed all version 1 documentation, examples, and API references. This will require you to use existing version 1 plugins to figure out how to make a plugin. Also, Redactor will strip some HTML elements from content, an example being the div tag.

Here are two free Redactor add-ons that you can use as examples:
https://www.concrete5.org/marketplace/addons/icons-for-redactor...
https://www.concrete5.org/marketplace/addons/mrkdilkington-add-and-r...

Another option is using the Internet Archive Wayback Machine to reference version 1 documentation on imperavi.com