5 Replies Latest reply on Feb 19, 2009 3:52 PM by jenellea1

    Can I prevent Inline Styles?

      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.

      • 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.
        • 1. Re: Can I prevent Inline Styles?
          Peter Grainge Adobe Community Professional
          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?

          • 2. Re: Can I prevent Inline Styles?
            SNDavisID Level 1
            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?
            • 3. Re: Can I prevent Inline Styles?
              Peter Grainge Adobe Community Professional
              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.

              • 4. Re: Can I prevent Inline Styles?
                SNDavisID Level 1
                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.
                • 5. Re: Can I prevent Inline Styles?
                  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.)