How to set custom keys for html tags like <p>
-
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?
-
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.
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. -
i couldnt find such a plugin installed or available. I am using 64 bit…
-
@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.
-
This post is deleted! -
This post is deleted! -
@peterjones thanx a lot. It works perfectly … Really appreciate it