Skip to main content
Jared Hess
Brainiac
October 14, 2020
Question

Reason for CDATA styles? And how to disable them?

  • October 14, 2020
  • 5 replies
  • 351 views

RH 2017 (latest)

 

So, in some of our .htm pages, I noticed this style block kept appearing:

 

 

<style type="text/css">/*<![CDATA[*/
A:visited {
color: #954F72;
}
A:link {
color: #0563C1;
}
/*]]>*/</style>

 

 
This conflicts (takes precedence) with our style sheet, so I removed them. But what causes them to appear in the first place? I'm guessing it appears due to a copy and paste from Word into RH. Is that right?
 
If so, is there a setting somewhere that turns this off so that copy-pasting only pastes straight text? I've not seen anything like that setting, and so my usual process is to paste into something that strips out all inline styling first, like Np++. Then copy from there into RH.
 
I know in RH I can right-click on paragraphs, and choose Remove Attribute to get rid of inline styling at the paragraph level. But that doesn't do anything to this style block that gets added into the header.
 
Thank you.
This topic has been closed for replies.

5 replies

Jared Hess
Brainiac
October 19, 2020

Thanks everyone.
@Amebr  - may I get a copy of your "Frankenscript"? I'd love to have that in my toolbox for when this happens again.

Erwin.Timmerman
Inspiring
October 15, 2020

There's a small freeware program called PureText. It installs itself under WIN + V (but you can change this if you want). It converts the contents of the clipboard into plain text before pasting it. It is program-independent so works for every program instead of just RH or just Excel etc.

 

I find it very useful. Paste normally: ctrl+v, paste plain: win+v.

 

The latest versions of Word prevent win+v to paste into it directly (there I use win+v and then immediately ctrl+v) , but pasting into RH works perfectly with just win+v.

Community Expert
October 14, 2020

Oh that thing is so annoying.

 

Robohelp Classic (from at least RH11) shows a style block, but if you open the topic in Notepad it's actually properties on the body tag. I made a Frankenscript I run on every imported doc to remove it, and the OriginalFile meta tag and all the formatting and MS styles.

 

 

Peter Grainge
Community Expert
October 14, 2020

I believe it is caused by importing from Word. 

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
Jeff_Coatsworth
Community Expert
October 14, 2020

IIRC, that stuff comes from Word doc imports (but I could be be wrong - it's been known to happpen 😁)