In my stylesheet I have a paragraph style that uses a text prefix of "Review:" in the color red:
p.Review
{
font-style: italic;
mc-conditions: 'Default.Review';
background: #E9CBD0;
mc-auto-number-format:'{color red}Review: {/color}';
}
Problem is with the Word output, it displays as follows:
{color red}Review: {/color}
Is there any way to fix this for Word?
Also, is there a way to have Conditionally text to display in a different color in the output without have to create and apply a style?
Word Output displaying CSS
-
- Propeller Head
- Posts: 47
- Joined: Mon Jun 28, 2021 8:02 am
Re: Word Output displaying CSS
Well, that's annoying! I can think of two workarounds until MadCap fixes it:
You can search for {color red}Review: {/color} in Word and replace it with Review: in red.
Or, you can output the PDF and then convert the PDF to Word.
You can search for {color red}Review: {/color} in Word and replace it with Review: in red.
Or, you can output the PDF and then convert the PDF to Word.
Doing Online Help since 1990. I remember "dots" .........
Got a bug? https://www.madcapsoftware.com/feedback/bugs/
Got a suggestion? https://www.madcapsoftware.com/feedback ... quest.aspx
Got a bug? https://www.madcapsoftware.com/feedback/bugs/
Got a suggestion? https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Word Output displaying CSS
I only have a few moments... This is a known shortcoming of Flare's Word output. Instead of using the {color red} code in the mc-auto-number-format attrbute, you could set up a span class, call it something like span.ReviewColor and then add to p.Review this attribute:WebHelpppp wrote:In my stylesheet I have a paragraph style that uses a text prefix of "Review:" in the color red:
p.Review
{
font-style: italic;
mc-conditions: 'Default.Review';
background: #E9CBD0;
mc-auto-number-format:'{color red}Review: {/color}';
}
Problem is with the Word output, it displays as follows:
{color red}Review: {/color}
Is there any way to fix this for Word?
Also, is there a way to have Conditionally text to display in a different color in the output without have to create and apply a style?
Code: Select all
mc-auto-number-class: ReviewColor;
Code: Select all
p.Review
{
font-style: italic;
mc-conditions: 'Default.Review';
background: #E9CBD0;
mc-auto-number-format:'Review: ';
mc-auto-number-class: ReviewColor;
}
span.ReviewColor
{
color: red;
}
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
- Propeller Head
- Posts: 78
- Joined: Thu Jul 17, 2014 8:08 am
Re: Word Output displaying CSS
Thanks, that works.
Now I have an additional related problem, I have a condition and a paragraph style called TWNote. Online it Excludes from the build, no problem, but in the PDF or Word it still displays. Fortunately I caught it before it went out. Anyway to stop it? It's so quick to apply the paragraph style vs the condition, I hope I don't have to redo all of the paragraphs.
p.TWNote
{
mc-conditions: 'Default.TWNote';
background: #E9CBD0;
}
I have found that if I apply the conditional code first and then apply the paragraph style it doesn't display in the PDF or Word output, I had really hoped it would work just like the online help.
Now I have an additional related problem, I have a condition and a paragraph style called TWNote. Online it Excludes from the build, no problem, but in the PDF or Word it still displays. Fortunately I caught it before it went out. Anyway to stop it? It's so quick to apply the paragraph style vs the condition, I hope I don't have to redo all of the paragraphs.
p.TWNote
{
mc-conditions: 'Default.TWNote';
background: #E9CBD0;
}
I have found that if I apply the conditional code first and then apply the paragraph style it doesn't display in the PDF or Word output, I had really hoped it would work just like the online help.
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Word Output displaying CSS
So have you configured your PDF target to exclude the TWNote condition? I would think that would solve the issue, yes?
p.s. In future, rather than bringing up a new issue in a post not originally about that issue, I suggest you start a new post. Not a problem right now for this post. Just for future reference. Thanks!
p.s. In future, rather than bringing up a new issue in a post not originally about that issue, I suggest you start a new post. Not a problem right now for this post. Just for future reference. Thanks!
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
- Propeller Head
- Posts: 78
- Joined: Thu Jul 17, 2014 8:08 am
Re: Word Output displaying CSS
After troubleshooting I found the problem was in my stylesheet. I had moved the print styles to a separate stylesheet but I didn't remove @media print and the brackets { } around the code. After deleting @media print and the brackets TWNote no longer displays in print output. Yea!
I'll take your advise and create a new post next time.
I'll take your advise and create a new post next time.