DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Formatting Comments

Sort:
You are not authorized to post a reply.





New Around Here





    Hey, folks. Appreciate your help.
    The DNN code editor reformats comments when the HTML module is saved. For example, this is what I want: 

    </div> <!-- End Card -->
    </div> <!-- End Book Item -->
    <!-- Insert new book card above this line -->
    </div> <!-- End Row -->
    </div> <!-- End Container -->

    But when I save the HTML module, this is what I get: 

    </div>
    <!-- END CARD --></div>
    <!-- END BOOK ITEM --><!-- INSERT NEXT BOOK ABOVE HERE --></div>
    <!-- END ROW --></div>
    <!-- END CONTAINER -->

    Is there a way to lock in my formatting when the code is saved? Thank you.

    John  






    Veteran Member





      Hmm, I'm not sure if my previous link helps against reformatting.
      When you want exact control over the HTML, IMO it's better to use a structured content module like Open Content or 2sxc

      The DNN HTML Editor is not a very good fit in that case (and not made for it).






      New Around Here





        Thank you, Timo. In my case there is no additional content to allow. Everything I enter is there, it's just no longer WYSIWIG. I'll look into your other suggestion.

        John





        Veteran Member





          As a general rule, there still remains not a single HTML editor that handles the HTML source exactly the way some of us "power users" will expect.  Something will undoubtedly get changed or removed.  A large number of these instances are related to the syntax updating faster than the various online editors.  However, the biggest reason is that most of these editors are trying to protect the rest of the users that are using the same tool.  

          So, as Timo suggested, if you want full and unbridled control over your HTML, you really should use any structured content solution out there.  Lucky for us all, the two most popular ones are both open-source and listed for you below.  😎 

          You are not authorized to post a reply.

          These Forums are dedicated to the discussion of DNN Platform.

          For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

          1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
          2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
          3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
          4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
          5. No Flaming or Trolling.
          6. No Profanity, Racism, or Prejudice.
          7. Site Moderators have the final word on approving / removing a thread or post or comment.
          8. English language posting only, please.

          Would you like to help us?

          Awesome! Simply post in the forums using the link below and we'll get you started.

          Get Involved