5 Replies Latest reply on Jul 12, 2006 8:23 AM by HKabaker

    CSS mayhem in True Code

    mballai
      I know it's not my eyes and it can't be the Cappucino Heath Blizzard I had last night, but the RoboHelp True Code editor is a strange bird. I added a class to the style sheet and took out the unnecessary style html when I added the class to the tags. So I save the page, recompile the project and.... the TrueCode adds the style line stuff I just took out!

      Ok I know the wysiwyg editor needs all the help it can get, but this was mighty strange. I look and the file is a couple K smaller than the file saved in my backup folder. Then I open the page in Note Tab Light and lo and behold the style lines ain't there at all. But they are in TrueCode. Or is it MaybeCode?

      Any explanation might help preseve my sanity.
        • 1. Re: CSS mayhem in True Code
          Peter Grainge Adobe Community Professional (Moderator)
          Nah! You must have gone mad. How could you think the editor would make changes all by itself! Perish the thought.

          If you want a real good laugh highlight some plain text and apply Bold. Then highlight it again and remove Bold. Is the code as it was when you started? Not a chance. Sorry but that's the way it is, RH rewrites code to its own rules. I think we are all hoping for a change there in the next version.

          I have seen instances where the true code view was not the same as in a text editor although that in fairness is unusual. Long time since I have seen it. Not much you can do but try opening it in other text editors such as Notepad to get another view.

          Sorry but no real answer except that it's not you or your project. If it causes a problem, you might want to think about using a different editor.

          • 2. Re: CSS mayhem in True Code
            mballai Level 1
            Notepad shows the same code as Note Tab Light. Since the difference in appearance is simply a 'virtual redundancy', it's not problematic. Must be doing the same sort of voodoo as the kadov tags. It is an annoying feature, but now I know how to determine what the actual code really looks like.
            • 3. Re: CSS mayhem in True Code
              HKabaker Level 2
              Frequently, when I'm trying to troubleshoot a formatting problem in WebHelp, I find a lot of junk in the RH Truecode that results in strange html output.

              For example, if you bold and unbold a lot of text in a paragraph, you can end up with unnecessary "font weight:normal" tags, or <span>....</span> strings.

              Similarly, lists and bullets sometimes get messed up because RH loses track of where the <OL> and <UL> pieces start and end.

              Some of of the code is there because the RH WYSIWYG editor needs it to display stuff the way it thinks it will look in the final WebHelp.

              And need I remind anyone that converting topics from MS Word brings in a lot of Word tags that can screw up RH formating. To say nothing of tables?

              When you have formatting problems, or a file seems bloated, look at it in Notepad, Wordpad, FAR or any good text editor.

              Harvey

              (edited to fix "WYSIWYG")
              • 4. Re: CSS mayhem in True Code
                mballai Level 1
                Harvey is exactly right. I am cleaning up my imports and the difference is astronomical. Properly done your htm files can be half the size of the original import htms. It all depends on how much you use the style sheet when you start going though the code. While computers are getting very fast and powerful, it will amaze you at how much smoother pages load when they are cleaned up.
                • 5. Re: CSS mayhem in True Code
                  HKabaker Level 2
                  Don't be surprised if RH puts some of that stuff back in. It can't help itself here; some code is needed for display in RH but gets stripped on output.

                  Harvey