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

Can I prevent Inline Styles?

New Here ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

The issue:
I author from the HTML view. When a character tag immediately follows a paragraph tag, RoboHelp automatically adds inline styles to the character tag. Even if I delete the extra style, it will always return the next time I view the file.

Examples:
• I enter <li><em>. The next time I view the file in RoboHelp the tags become <li><em style="font-style: italic;">.
• Also occurs with <p><code> combinations I use frequently.

What I’ve found so far:
• Even if I delete the extra style, it will always return the next time I view the file.
• Issue does not occur when there is an actual character between paragraph tag and character tag. For example RoboHelp does not add inline styles if the tags are spaced similar to the following: <li>A<em>. It must be a character, spaces don’t work.
• I recently upgraded from RoboHelp 6 to RoboHelp 7. I'm not sure if that makes a difference or not.

Desired Outcome:
I need a way to prevent RoboHelp from adding any inline styles. The styles I use are constantly changing, so all my styles are defined in a CSS. I need to be able to change styles in the CSS and have it apply to all my content. This is why it is important to me that there not be any inline styles I would have to manually search for and replace.

I appreciate if anyone has any feedback.

Views

537

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 ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

You cannot stop RH's editor rewriting some of the code. You can configure RH to edit using a variety of editor's including Notepad but then you lose the advantages of working in the WYSIWYG editor, such as dragging a topic to preselected text to create a hyperlink.

Applying the em tag indicates you want text to be italic rather than what is defined for the paragraph style in the CSS. If you change the CSS so that the paragraph changes font and point size, even written your way that text would still be italic but in the new font and size. What's the difference?

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
New Here ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

Sorry, <li><em> to <li><em style="font-style: italic;"> was a bad example.

A better example would be the <p><code> which gets changed to <p><code style="font-family: monospace;">
In the CSS, this font is set to be Courier, but a month ago it was Times New Roman and there is potential for it to change again in the future.

I would like to keep changing the editor as a last resort because I do use the click and drag for links. Is there any other way?

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 ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

That example is not defining a specific font. Try changing the CSS. I suspect it will work as you want, not as you are expecting.

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
New Here ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

Test Results: I changed CSS for <code> from Courier to Ariel. Ariel was applied only to those tags that were left as <code>. Tags that RH changed to <code style="font-family: monospace;"> still appeared as Courier. Upon closer inspection some files acted this way and some files ignored the CSS change altogether. Appears as if all files reference the correct CSS. I viewed the same occurances after I closed and reopened RH and after I output the files.

Something else seems to be going on here. I need to do some more testing to see what's up. I appreciate the feedback though. I at least know now that I can change the editor if there is no other workaround. Thanks.

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
New Here ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

LATEST
Regarding "the correct CSS," sometimes I've noticed that copying/moving a topic to a different folder will create (or replicate) a .css in that folder. This creates the potential of having 2 css files with the same name in your project. I'm using RH 5, so I open the Topics tab, make sure "All Folders" is selected, select all the topics and then right-click the lot of them and set the .css to the one in the skins folder.

(I may also set the template, though I should think the template only applies when something was CREATED--please tell me how the template is used afterward.)

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