Default style in Flare editor?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
scap
Propeller Head
Posts: 55
Joined: Tue Jun 28, 2022 7:36 am

Default style in Flare editor?

Post by scap »

Is there a way to set the default style in the Flare editor? That is, the style that's defaulted to every time you press Enter to take a new line, namely <p>.

I have taken over a large project where a custom class is used for all main paragraph content, such that the XML tagging is <p class="p_1">.

It's a complete pain having to restyle everything individually every time I enter new content.

Thanks.
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Default style in Flare editor?

Post by doloremipsum »

Flare does have a feature that lets you set what style will be next when you press enter: https://help.madcapsoftware.com/flare20 ... -Style.htm. It seems you'd have to set it on every block element in your stylesheet (although maybe you could set it on the body tag once and be done with it?)

If I were you I'd spend a bit of time to refactor the styles so that the default style is just p. Then you can run a Find-And-Replace-Elements to clear the old style out. That's what I did to get rid of a bunch of annoying styles imported from an older system (p class="bodytext" :roll: )
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
Ioana_St
Jr. Propeller Head
Posts: 5
Joined: Thu Jun 18, 2020 3:02 am

Re: Default style in Flare editor?

Post by Ioana_St »

It looks like your project indeed contains content imported from a different system. I recently had the same situation - a project full of p_1, p_2, span_1, etc, after an import from RoboHelp.

You may know all this, but I will explain, just in case.

This behavior is driven by the checkbox "Convert inline formatting to CSS styles" in the Import Project Wizard (at least for RH import). What it means is that if, in the original project, you had inline styling, it will get converted into a class in the new project. In my case, there were a lot of cases where we had used Ctrl+B and Ctrl+I to format text instead of using classes defined as bold or italic font.

Example:

If you had this in the original project..

Code: Select all

<p style="color: #000000;">My sentence</p>
...it will get converted to this in the new XML...

Code: Select all

<p class="p_1">My sentence</p>
...and you will have this in your new CSS

Code: Select all

p.p_1 {
color: #000000;
}
If you are sure that all "simple" paragraphs should look like a "p_1" paragraph, the easier way to fix this is to modify your CSS to:

Code: Select all

p {
color: #000000;
}
Basically, to indicate that a <p> without a class should look like the former p_1 class.

After you do this, you can clean up the project using search and replace (Find Elements):
Find: Tag = p, Class=p_1
Replace/Action: Remove Class=p_1
scap
Propeller Head
Posts: 55
Joined: Tue Jun 28, 2022 7:36 am

Re: Default style in Flare editor?

Post by scap »

Ioana_St wrote:It looks like your project indeed contains content imported from a different system. I recently had the same situation - a project full of p_1, p_2, span_1, etc, after an import from RoboHelp.
Oh dear lord that's explains a lot and reestablishes some lost sanity, thank you!

A previous Technical Writer didn't bother cleaning anything up after the import, the projects have dozens of spans_<number> and p_<number>! They rolled around in this mess for years :shock:
Last edited by scap on Thu Sep 01, 2022 10:10 am, edited 2 times in total.
scap
Propeller Head
Posts: 55
Joined: Tue Jun 28, 2022 7:36 am

Re: Default style in Flare editor?

Post by scap »

doloremipsum wrote:Flare does have a feature that lets you set what style will be next when you press enter: https://help.madcapsoftware.com/flare20 ... -Style.htm. It seems you'd have to set it on every block element in your stylesheet (although maybe you could set it on the body tag once and be done with it?)

If I were you I'd spend a bit of time to refactor the styles so that the default style is just p. Then you can run a Find-And-Replace-Elements to clear the old style out. That's what I did to get rid of a bunch of annoying styles imported from an older system (p class="bodytext" :roll: )
Thanks for that tip from the Flare help, interesting!

I'm probably going to scrub the decks and start with a new CSS afresh.
Post Reply