What we get now on the img tag is, for example: class="imagecache-250_wide"

This is great for targeting specific Imagecache presets, but not so good for doing something like "float all inserted images right and add a border and left margin", since all available presets would need to be targeted if editors have access to more than one. Could we add an Insert-specific class on here as well so they could be targeted generically?

Something like class="image-insert imagecache-250_wide"?

(I know this is trite in a feature request issue, but it's true... I LOVE LOVE LOVE this module!)

Comments

quicksketch’s picture

You can easily add this yourself by configuring the field, then adding whatever class you like in the field configuration under "Insert".

quicksketch’s picture

Category: feature » support
Status: Active » Closed (fixed)
Anonymous’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Category: support » feature
Status: Closed (fixed) » Active

Hi there,

Just stumbled upon this. Forgive me for reopening this issue. :-)

>> You can easily add this yourself by configuring the field, then adding
>> whatever class you like in the field configuration under "Insert".

I believe what stephthegeek originally meant was wether it would be possible to output the imagecache preset's name *additionally* to the img's class. Not just the name for this specific field. The way I use Insert is that I allow users to select from multiple imagecache presets, some of which require different styling. For example, the in-paragraph-floating images potentially require different margins than images which are as wide as the paragraph itself.

Something like: class="article_img Large_Image"

..where "article_img" is the class I entered into the field's configuration and "Large_Image" is the name of the imagecache preset the user choose to insert. This would also make it easy to implement the floating direction already at "Insert-Point", even if it might need an additional imagecache preset. But that's not a biggie usually because you might want different sizes for images, depending on which side of the paragraph they're floating, to start with.

Greetings,

genox

quicksketch’s picture

Status: Active » Fixed

This functionality is already included. See the imagecache-insert-image.tpl.php file:

<img src="<?php print $url ?>" alt="__alt__" title="__title__" class="imagecache-<?php print $preset_name ?><?php print $class ? ' ' . $class : '' ?>" />
Anonymous’s picture

Quicksketch, my bad. I just figured that I completely overlooked this. :-(

Sorry!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.