9 Replies Latest reply on Nov 30, 2006 5:21 AM by Peter Grainge

    Script in Robohelp HTML

      I want to delete something and apply a certain style on my HTML page..... i want this automated.... is this possible in Robohelp HTML?...Please guide me in this matter....becuz I have to make huge Helps....and I have to delete and apply the style manually on every HTML page (even after applying a custom style sheet).
      Thank You.

      Fyeq Tariq Syed.
        • 1. Re: Script in Robohelp HTML
          Peter Grainge Adobe Community Professional
          Welcome to the forum.

          Fyeq, you are going to have to tell us a bit more. You refer to"Script" which could mean some javascript. The rest of your post though suggests that you have defined styles in a css file but they are being overridden. If that is the problem, then either an inline style or an embedded style sheet is overriding what is in your css file.

          How many topics are you talking about that need the inline styles removed?

          • 2. Script in Robohelp HTML
            fyeq Level 1
            Thankx Peter,

            I was thinking of using Script as a Macro in HTML help for deleting and applying style(automating this tedious task) ...but you are right it has to do something with styles being applied. Basic problem is with styles containing Numbering or Bullets, they dont change as according to styles in the External Style Sheet. I have to manually select the style, apply it and delete the old style bullet. I make user guides of Softwares, which contain many fields, and they have to be displayed through bullets...which takes me forever to format....I hope I have conveyed my problem to you properly...and you will guide me through this problem successfully.

            3-4 styles of the External Style Sheets are being overridden by the inline styles.

            Thank Again.

            Fyeq Tariq Syed
            • 3. Re: Script in Robohelp HTML
              Peter Grainge Adobe Community Professional
              You need to identify the problem by working on one topic. You might be able to identify a way of using a multi file find and replace tool to get rid of an embedded style sheet. Correcting inline styles will be a bit more difficult. It's easy to find and replace the opening tags as they will be more or less unique but the closing tags that you need to remove will be the same tags as ones you don't want to remove.

              Sorry but it's a getting hands dirty job.

              How did the files get to be created with all these problems?

              • 4. Re: Script in Robohelp HTML
                ElisaFnord Level 2
                How good are you with Microsoft Word?

                Despite the fact that Word creates lousy HTML, it imports well into RoboHelp. And it's really, really, easy to get rid of inline styles in Word - press CTRL+A to select everything in the document, then press CTRL+Spacebar to clean out all character formatting (Plain for Style).

                So you might generate a Word document from your help project, format it correctly in Word using paragraph styles only (Word does support macros), and import it into a new project.

                However, this won't work well for an established RoboHelp project. If you have a bunch of links already set up in your project, you would have to create them again in the new project after the import. It would probably take less time to go through the TrueCode and clean up the formatting.

                • 5. Re: Script in Robohelp HTML
                  fyeq Level 1
                  hey Peter,
                  I am helpless in fixing this problem....if u have time i can mail u my style sheet...and u can check..wats wrong with it

                  Thank u
                  • 6. Re: Script in Robohelp HTML
                    Peter Grainge Adobe Community Professional
                    I am on holiday at the moment so I cannot look at the style sheet. Back next week.

                    However, even if I did ask you to send it, I am not clear what the problem is. Your original problem seemed to be that you have inline styles applied that you do not want. You cannot change them from the style sheet.

                    Can you please explain in more detail what the problem is and what you want to achieve. Perhaps then I or someone else can help.

                    • 7. Re: Script in Robohelp HTML
                      MergeThis Level 4
                      I just stumbled across this HTML/CSS feature, which states that using the "!important" rule reverses the normal cascading of styles. That is, this would ignore any SPAN tags that normally are used to override a style in a style sheet. I have not tested this because I don't have the need to, but it seems to hold promise for your situation.

                      In case you're unclear on Cascading Style Sheets:

                      External styles (in a CSS file)
                      ...are overriden by internal styles (in a topic's STYLE section)
                      ...are overriden by specific "style=" additions within a a style's tag (H2, Note, etc.)

                      As usual, back up your stuff before you try using this solution. Let us know how it works for you (and whether we have even identified your problem properly).

                      Good luck,
                      • 8. Re: Script in Robohelp HTML
                        fyeq Level 1
                        I failed.......I tried to add !important to the styles in the CSS file, but they fail to make any difference on the look and feel of the final output in the html file.

                        Your help is greatly appreciated by me and my team members.

                        Thank you,

                        Fyeq Tariq Syed
                        • 9. Re: Script in Robohelp HTML
                          Peter Grainge Adobe Community Professional
                          Set up a test project with some inline styles and use the style sheet without "important". Make sure the inline style is overriding the css. Then apply the "important" setting.

                          In a clean project it will be easier to validate the results you are getting.

                          Then when you have it working as expected, try again with your real project.

                          If that fails, zip up and mail me one of the topics and the style sheet. In the email explain clearly what bit of text is not appearing as you expect and how it should appear.