We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Addons, Add-on-development, Redactor

Adding simple functionality into Redactor

We use Redactor in Perch primarily because it allows our writers to drag'n'drop images into their pages.

Occasionally we want to assign a class to an image, in fact to zoom it. An example is at

http://aircrewremembered.com/suggitt-william.html

Mouse over the headstones and you'll see the class in action.

This involves a simple CSS scaling class called "zoom" which at present we call by manually inserting class="zoom" in the <img> code we can get in the Redactor edit window. Obviously this isn't something the average writer can do, so I specified the requirement for a Redactor plug-in to insert class="zoom" in a specific image dragged into the Redactor edit window.

The guy who wrote this bit of js got it to work (right click to bring up his dialog) but not in our Perch environment. He did not appreciate that Perch doesn't call his code during the Redactor editing phase.

I'm not enough of a programmer to know how to move forward on this. Can anyone take up the cudgel on this? I can supply the js, our gratitude and more.

Stefan Youngs

Stefan Youngs 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If it's implemented as a Redactor plugin, I don't see why it wouldn't run with Redactor. Just make sure it's referenced in the redactor/_config.inc file and you should be good.

Otherwise, it would be better to get your guy to post and we can help out.