Hi,

Out of the box automatic inserts fullsize original image and file links if its other than image, which works great.

I have Colorbox Attachment image preset, which user will have to choose from drop down menu. I could see in insert.inc

if ($style_name == 'auto') {
    $info = @pathinfo($item['filepath']);
    if (in_array(strtolower($info['extension']), array('png', 'jpg', 'jpeg', 'gif'))) {
      $style_name = 'image';

How could I configure the automatic $style_name to colorbox?

Thanks

Comments

Category:feature» support

You can override the template that Insert uses to add the colorbox class to inserted links/images. I'm not familiar with Colorbox to know what this class name is, but if it's like Lightbox you simply have to add a class or rel attribute to the link to make it open in a lightbox. Considering there are numerous competing lightbox-like modules out there, Insert module won't integrate support for them directly. Overriding the Insert templates in your theme is probably the best bet, but those modules could also integrate with Insert by implementing hook_insert_styles() in their own modules.