Reason for CDATA styles? And how to disable them?

Enthusiast ,
Oct 14, 2020

Copy link to clipboard

Copied

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.
TOPICS
Classic

Views

70

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 14, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 14, 2020

Copy link to clipboard

Copied

I believe it is caused by importing from Word. 

 

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 14, 2020

Copy link to clipboard

Copied

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.

 

Amebr_0-1602719842998.png

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Contributor ,
Oct 15, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
JaredHess AUTHOR LATEST
Enthusiast ,
Oct 19, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more