• Login
Community
  • Login

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

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
htmltagskeyboard
7 Posts 3 Posters 1.4k 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.
  • C
    Crisis Digital
    last edited by Crisis Digital Dec 9, 2021, 4:45 PM Dec 9, 2021, 4:44 PM

    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?

    P 1 Reply Last reply Dec 9, 2021, 5:02 PM Reply Quote 0
    • P
      PeterJones @Crisis Digital
      last edited by PeterJones Dec 9, 2021, 5:17 PM Dec 9, 2021, 5:02 PM

      @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.

      C M 2 Replies Last reply Dec 9, 2021, 5:15 PM Reply Quote 2
      • C
        Crisis Digital @PeterJones
        last edited by Dec 9, 2021, 5:15 PM

        @peterjones

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

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

        P 1 Reply Last reply Dec 9, 2021, 5:16 PM Reply Quote 0
        • P
          PeterJones @Crisis Digital
          last edited by Dec 9, 2021, 5:16 PM

          @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.

          C 2 Replies Last reply Dec 9, 2021, 5:43 PM Reply Quote 0
          • M
            Michael Vincent @PeterJones
            last edited by Dec 9, 2021, 5:17 PM

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • C
              Crisis Digital @PeterJones
              last edited by Dec 9, 2021, 5:43 PM

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • C
                Crisis Digital @PeterJones
                last edited by Dec 9, 2021, 5:53 PM

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

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