Good morning

My wife posts to her blog by using MS Windows Live Writer. This tool allows her to insert images into her post, and the tool will perform the resizing and upload the content accordingly. It makes the whole posting thing easier for her :P

However, from what I can see in the tool, there's no mechanism to add the "rel='lightbox'" tag, or assign styles to images.

Is there a way that I can have all images be lightboxed? Maybe an input filter to add rel=... to all images in a node? Or is there an option I haven't come across?

Lightbox version: 6.x-1.9
All browsers that I can tell
Site is at http://www.hollyatlee.com/

Thanks!

Comments

stella’s picture

Can you add a class to the link and / or image?

timatlee’s picture

Well.. Sort of.

If I drag-n-drop an image from my desktop, WLW will automatically resize the image, and link to the source image. I never actually create the <A> tag. As an example, all the following is generated by WLW before posting to the site:

<p><a href="$Winter[2].jpg"><img title="Winter" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="Winter" src="$Winter_thumb.jpg" width="244" border="0"></a></p>

I can't edit the <a href="$winter[2].jpg"> tag from the interface without going into a source editing screen (which goes beyond her comfort zone.. which is why I was having her use WLW in the first place).

I might be able to do something in jQuery to add a class after the node loads, but it might be just as easy to write an input filter as well.

stella’s picture

Yeah, if you can't edit the anchor or image tags to add a rel or a class, then I'm not sure how it can be done currently...

timatlee’s picture

Ok, sounds good - just looking to not duplicate work unless needed.

If I were to write an input filter that would change <img> tags to include <img rel="lightbox">, anything I should be careful of? Grouping by nodes maybe?

My application is pretty simple - just add the "rel=lightbox" property, but if it could be used by others, it'd be nice to make it portable.

stella’s picture

i can't think of any issues off the top of my head.

stella’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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