Community
    • Login

    Is there an HTML equivalent to the XML Tools plugin?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 350 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ben HutchinsonB
      Ben Hutchinson
      last edited by Ben Hutchinson

      While most HTML tags are XML compatible, some are not. In XML, every tag must be closed, either self closed like <mytag/> or a separate closing tag after the opening tag must be used like <mytag></mytag>. In HTML there are some tags that are defined as NOT NEEDING to be closed (and would actually be INCORRECT SYNTAX to close them). One of these is the <img> tag. Such tags are NOT correctly handled by XML Tools. It thinks they are opened tags and without a closing tag, EVERYTHING AFTER THEM gets an INCORRECT INDENTATION.

      What is needed, is something that I would imagine would probably called HTML tools, and it would correctly recognize which HTML tags are supposed to be closed, and which are NOT supposed to be closed (this is something defined by the official HTML standard). If HTML Tools doesn’t yet exist, I encourage any Notepad++ plugin developers out there to take on this project, and make it exist.

      1 Reply Last reply Reply Quote 0
      • TroshinDVT
        TroshinDV
        last edited by

        @Ben-Hutchinson said in Is there an HTML equivalent to the XML Tools plugin?:

        I am using tidy.exe + jN plugin for html formatting.
        jN plugin for user interface interaction with N++.
        tidy.exe for formatting.

        see https://github.com/trdm/jn-npp-scripts/blob/master/includes/trdmTidy.js
        functions formatHtmlFile(); myFormatHtmlFiles().
        alt text

        It was done for myself. “Just for Fun”. I know I need to improve.
        If you need to improve - write.

        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors