3 Replies Latest reply on Jul 15, 2009 7:10 AM by James K. Patrick

    How to handle RH8's HTML rewrites?

    James K. Patrick

      Hello all,


      From this forum, I've leaned some of the "unique" characteristics of the RH8 WYSIWYG editor and how it can rewrite HTML when jumping back and forth between Design and HTML views.


      In many topics, I've added "Top" links so readers can jump to the mini-TOC at the top. I enter

      <a href="#" class="top">Top</a>

      in the HTML editor and style it w/ CSS.


      Of course RH8 rewites this to

      <a href="#" class="top" style="color: #0000ff; text-decoration: underline; ">Top</a>

      and the CSS I need to use is overridden by the inline style. Bummer.


      So I need a sanity check on the best way to maintian clean HTML and retain control with CSS - at least until the project is generated. Here's what I'm doing thus far.


      1. Add my "Top" links to all my topics in HTML view: <a href="#" class="top">Top</a>.

      2. Complete EVERYTHING else I need to do in RH8, except generate the project.

      3. Do a Find a Replace on all the topics in the project to swap out

      <a href="#" class="top" style="color: #0000ff; text-decoration: underline; ">Top</a>


      <a href="#" class="top">Top</a>

      4. NEVER open those topics in the WYSIWYG editor again.

      5. Generate the project.


      Alternatively, I guess I could use a 3rd party Find and Replace tool to swap the HTML code for the "Top" link AFTER the project was generated.


      Naturally, this only works until those topics need to be worked on in RH8's WYSIWYG editor. Once that happens, the above steps need to be repeated.


      Is there a better way to do this? Am I doing too much work for something that should be simple?


      Thanks for any wisdom you can share.