0
votes

I'm using the Redactor WYSIWYG editor and all works fine, but I wish to know how I can add a class and/or ID to the images been uploaded, so I can use this for a lightbox effect.

Is there a plugin (PHP/Laravel) or some way to do this?

Any help greatly appreciated.

2
What exactly do you want? Can you not use CSS to address all images in your redactor div? Or do you want some images to have an extra class and some not?... - g_uint

2 Answers

0
votes

You can use imageUploadCallback for editing image tag.

0
votes

you can check the imageCallbacks

$('#redactor').redactor({
    imageUploadCallback: function(image, json)
    {
        $(image).attr('id', json.id);
        // add your ID/class here
    }
});