• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Reason for CDATA styles? And how to disable them?

Enthusiast ,
Oct 14, 2020 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

165

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2020 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 😁)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2020 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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 15, 2020 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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 19, 2020 Oct 19, 2020

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp