Community
    • Login

    How to set custom keys for html tags like <p>

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    htmltagskeyboard
    7 Posts 3 Posters 1.3k 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.
    • Crisis DigitalC
      Crisis Digital
      last edited by Crisis Digital

      How can i customise notepad++ in such a way that when I select a set of words and click “CTRL+ ALT+P” on keyboard I could get that words inside “<p></p>” tags?

      I want the same for h2, h3 and some other html tags… Is it possible?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Crisis Digital
        last edited by PeterJones

        @crisis-digital ,

        If you have 32-bit Notepad++, then there is a plugin called WebEdit which adds HTML tags to icons on the toolbar. Because those actions are in the plugin’s menu, you can use Shortcut Mapper’s “Plugin Commands” tab to assign keyboard shortcuts.

        d02d9b4d-5778-41a0-8e7a-3db7922d8b20-image.png

        But that plugin isn’t maintained, and you need to go through a few hoops to get it installed correctly, and it only has a version for 32-bit notepad++, so if you use 64-bit notepad++, you are out of luck for using this plugin.

        For alternatives, you can just record a macro. @astrosofista shares a macro in this post which takes your selection and it wraps <b>...</b> around the selection; that can be adapted to any HTML tag you desire. And since any macro can be assigned a keyboard shortcut in the Shortcut Mapper’s “Macros” tab, that would fulfill your purposes.

        Crisis DigitalC Michael VincentM 2 Replies Last reply Reply Quote 2
        • Crisis DigitalC
          Crisis Digital @PeterJones
          last edited by

          @peterjones

          i couldnt find such a plugin installed or available. I am using 64 bit…

          fc06cb07-a144-41f9-9b46-f2baf8a89edf-image.png

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Crisis Digital
            last edited by

            @crisis-digital said in How to set custom keys for html tags like <p>:

            i couldnt find such a plugin installed or available. I am using 64 bit…

            Like I said, WebEdit is only available for 32bit Notepad++.

            Since you are on 64bit Notepad++, macros are the easiest way to go. I already linked you to an example macro, which you should then be able to replicate for each tag that you want.

            Crisis DigitalC 2 Replies Last reply Reply Quote 0
            • Michael VincentM
              Michael Vincent @PeterJones
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • Crisis DigitalC
                Crisis Digital @PeterJones
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • Crisis DigitalC
                  Crisis Digital @PeterJones
                  last edited by

                  @peterjones thanx a lot. It works perfectly … Really appreciate it

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