Default image style

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Dafra08
Propeller Head
Posts: 45
Joined: Fri Aug 16, 2019 1:02 am

Default image style

Post by Dafra08 »

Is it possible to apply a style to an image on image level (so to speak)? That is, every time I insert the image the style is already applied. I do not want all images styled this way, only this particular image (and several others of course, too many to create a snippet for each and every one of them).

Example:
I have image-001.png that is used in several topics. To use the style img.screenshot I have to apply it in every single topic where the image is used. It would be nice to apply it on image level, and, if needed, be able to reset it on topic level.

Is it possible to set a default style for an image?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Default image style

Post by ChoccieMuffin »

Unfortunately I don't think it is. Depending on what you want the style to do, could you edit the image itself?

If that's not possible, then you could search in the code and look for the image and replace it with the image with the style applied. Whenever you have inserted it it probably looks like this in the code:

<img src="Resources/Images/image-001.png" />

(The path may be different depending on where you store your images, and if you add alt text or tooltips, you might also have other things before the closing />, so the change you need to apply, described below, shouldn't include the closing />.)

Search for: <img src="Resources/Images/image-001.png"
Replace with: <img src="Resources/Images/image-001.png" class="screenshot"

Repeat for the other images that you want to apply that style to.

This should work if you want to ALWAYS apply that style to the image. If you want to apply it to some and not all instances of the image, you'll need to click Replace rather than Replace All, and examine each instance. And obviously, you need to apply the class every time you insert the image from now on.

Hope that speeds things up for you.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Default image style

Post by SteveS »

Dafra08 wrote:Is it possible to apply a style to an image on image level (so to speak)? That is, every time I insert the image the style is already applied. I do not want all images styled this way, only this particular image (and several others of course, too many to create a snippet for each and every one of them).

Example:
I have image-001.png that is used in several topics. To use the style img.screenshot I have to apply it in every single topic where the image is used. It would be nice to apply it on image level, and, if needed, be able to reset it on topic level.

Is it possible to set a default style for an image?
If you are doing it to a limited number of images you can make the changes outside of Flare using a graphics program and save the image under a different name.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Dafra08
Propeller Head
Posts: 45
Joined: Fri Aug 16, 2019 1:02 am

Re: Default image style

Post by Dafra08 »

Thanks for the suggestions! This particular style is a drop shadow and sizing, so I'd rather not edit the image itself, since we might decide we want to change the look some time in the future.

It is not really a matter of applying the style to images that are already inserted in topics, although I will need to do that as well. I was mainly trying to avoid having to right-click the image, point to Style Class, and select the style every time I insert an image. Almost three clicks + the risk of forgetting + making sure any other authors don't forget to apply the styles as well ...

But I guess I could create a macro (or an AutoHotkey script) to do it. And send a feature request to Madcap :) Actually it would be nice to be able to apply styles on folder level as well as image level. Then you could have all your screenshots in \Screenshots with one style, your flow charts in \FlowCharts with another style etc., etc.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Default image style

Post by ChoccieMuffin »

Dafra08 wrote:Thanks for the suggestions! This particular style is a drop shadow and sizing, so I'd rather not edit the image itself, since we might decide we want to change the look some time in the future.

It is not really a matter of applying the style to images that are already inserted in topics, although I will need to do that as well. I was mainly trying to avoid having to right-click the image, point to Style Class, and select the style every time I insert an image. Almost three clicks + the risk of forgetting + making sure any other authors don't forget to apply the styles as well ...

But I guess I could create a macro (or an AutoHotkey script) to do it. And send a feature request to Madcap :) Actually it would be nice to be able to apply styles on folder level as well as image level. Then you could have all your screenshots in \Screenshots with one style, your flow charts in \FlowCharts with another style etc., etc.
I have my Styles window open all the time, so for me it's a single click rather than three:

1. Insert image.
2. In Styles window, click img.screenshots.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply