Notepad++ HTML editing tag insertion (surround) plugin

Notepad++ mascot

I use Notepad++ for my text editing need. To write my blog entries, I’m even handcoding my HTML using it!

It has neat features that makes it superior to Notepad such as a tabbed interface, internationalization (Unicode support and UI translations), and lots of text manipulation tools (HTML escaping, to name one).

One essential feature I miss when editing HTML using it is the tag wrapping functionality. That’s what the buttons in Wordpress’ HTML mode do:

Inserting a tag using Wordpress\' HTML editing mode

After asking around in the forum, I finally found the plugin I needed for Notepad++, WebEdit.

WebEdit 1.0 installation

You might want to check whether a newer version has been released from the forum thread. To download version 1.0, the newest at the time of this writing, use one of the following mirrors:

There are many files inside the zip file. What you need to do is to put WebEdit.dll inside Notepad++’s plugins directory, such as C:\Program Files\Notepad++\plugins. After that, put WebEdit.ini inside Notepad++’s plugin config folder. It might be inside the user’s folder such as C:\Documents and Settings\Agro\Application Data\Notepad++\plugins\config, or it might be inside Notepad++’s installation folder such as C:\Program Files\Notepad++\plugins\Config if Notepad++ is installed in “portable mode”.

Run (or restart) Notepad++, and you will find the oh-so-needed new plugin under the Plugins menu:

WebEdit, Notepad++ plugin that inserts HTML tags

The usage is dead simple. Select a block of text, and choose the tag you want to surround it with.

More tags and shortcut keys

To add your own HTML tags, just open the WebEdit.ini file mentioned before. Then add a new line using the following format:

MENU_NAME=LEFT_WRAP|RIGHT_WRAP

For example, to add the <a> HTML tag, you want to use this:

&Link=<a href="">|</a>

The ampersand (&) indicates the menu accelerator. After that just choose Load Config from WebEdit’s menu (or restart Notepad++).

To add shortcut keys, just go to Settings - Shortcut Mapper - Plugin commands. However note that they will all be buggily named “not used”, so you must check which is which from the Plugins menu itself. For example, you can add the shortcut key Ctrl+Alt+A to insert the <a> tag.

My wishlist

One additional feature I need dearly is for the plugin to ask some variables before inserting a tag. For example, using this kind of syntax:

&Link=<a href="{1:Destination URL}" target="{2:target}">|</a>

The plugin should ask me in a dialog box like so:

Wishlist: Asking variables before inserting a tag in WebEdit

And use the values I provided to substitute the curly brackets. Yea, similar to inserting the <a> tag using Wordpress.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Technorati
  • Slashdot
  • StumbleUpon
  • Sphinn
  • Facebook
  • Mixx
  • Google
  • TwitThis
  • Live

Tags: , , , , , , , , , , , , , , , , , , , ,

33 Responses to “Notepad++ HTML editing tag insertion (surround) plugin”

  1. Nox Says:

    This is fantastic! I’ve been wanting this functionality in N++ for a long time. Thank you for the tutorial, I’m putting this in my del.icio.us bookmarks.

  2. Agro Rachmatullah Says:

    I’m glad that you found it useful. You also reminded me to install that del.icio.us plugin on this blog :). Expect some delicious buttons soon.

  3. AlexIljin Says:

    Thanks for the feedback. I released the plugin v.1.1 yesterday, fixing (sort of) the bug you mentioned. Cf. the SourceForge forum for details and comments.

  4. Agro Rachmatullah Says:

    Thanks a lot for the update. I’m looking forward for future versions.

    Btw, it’s really cool that you use a non-mainstream language, Oberon :).

  5. AlexIljin Says:

    Don Ho, the Notepad++ developer, just recently replied me, saying that he will do what I asked for to better support the dynamic menu in my plugin. I will be able to display the actual function names in the Shortcut Mapper instead of the “WebEdit Slot…” text. It will be fixed in the upcoming Notepad++ 5.0 and later (alpha release is planned within a few hours from now).

    As to the Oberon language, I really liked it for its simplicity, as well as full OOP support. Plus, it’s the first ever fully compiled language to support automatic garbage collection (much like the SmallTalk or Java, but without the performance issues), which helps greatly in developing comlex systems, because you don’t have to worry about the memory leaks, dangling pointers and such. After 10 years of developing in Delphi I decided to switch. In November 2007 I found my new job at Amadeus IT Solutions, and now I’m developing in Oberon full time, using the XDS free optimizing compiler. : )

    WebEdit is a side step, which I did while studying the plugin system and Scintilla. What I’m actually doing is trying to turn Notepad++ into full-featured Oberon IDE, so a part of my time goes to the Obide plugin (not published yet). It already has some basic support for intellisense, code navigation and compiler integration. All these things are really possible for a single developer, because the language has a quite simple and consistent syntax : )

  6. Coheed Says:

    This is exactly what I’ve been looking for but I cannot get it to work. I’m on v1.3.1 of the plugin which was updated July 10th, but it’s still a no-go. The plugin itself may work — it shows up in the menu properly — but the WebEdit slots are all empty and grayed out.

    Even the default WebEdit.ini doesn’t work. I tried salting the config file in four separate places just to see if one of them got a hit, but none of them worked. I’ve now got copies of WebEdit.ini in npp/, npp/config, npp/plugins, and npp/plugins/Config, but the slots stay inactive.

    Help! :[

  7. Agro Rachmatullah Says:

    @Coheed

    I’m using WebEdit 1.3.1 with npp 4.9.2 and it’s working fine here.

    Most probably you didn’t put the WebEdit.ini file in the correct place. Did you try putting it inside “Notepad++\plugins\config” of your Application Data file? (e.g., not the one under “Program Files”, but on the folder such as “C:\Documents and Settings\Coheed\Application Data\Notepad++\Notepad++\plugins\config”)

  8. Coheed Says:

    Bah. Well that was an ease enough fix.

    The readme said nothing about Application Data initially. What it says is ‘The configuration file is looked for in the standard plugin configuration folder of the Notepad++ (if Notepad++ is installed in portable mode, the folder is “Notepad++\plugins\Config”).’

    Since that folder existed under Program Files I thought that’s where the config was meant to go. D:

  9. Steve Says:

    I already really liked Notepad++ for HTML editing. The tag-wrap function was the only thing about it that I thought was lacking. Really quite happy about this! Thanks for your hard work!

  10. Notepad++: convertire le entità e inserire tag HTML Says:

    [...] WebEdit, molto ben descritto nella sua installazione e funzionamento in un blog. [...]

  11. Appz Says:

    There is obviously a lot to know about this. I think you made some good points in Features also.

  12. Lomax Says:

    Great plugin! One thing that would complete my move from good old Homesite would be the ability to wrap HTML around multiple items. In HS you can selectet a couple of lines and with a right click turn them into a , or add line breaks to the end of each line. Being able to turn tab delimited text into s would be awesome.

  13. Lomax Says:

    [Oh crap, tags stripped out of course. Once more:]

    you can selectet a couple of lines and with a right click turn them into a <ul>, <ol> or add line breaks to the end of each line. Being able to turn tab delimited text into <table>s would be awesome.

  14. RottNKorpse Says:

    Thank you very much for making this post…this directed me to exactly what I was looking for so thanks again for the link.

  15. AbhiTechBlog Says:

    Excellent. thanks! :)

  16. vsync Says:

    It won’t work for me!
    I put the files on my dir “C:\Program Files\Notepad++\plugins”
    and the INI file and images in the “config” dir, and I see the plugin Toolbar. screenshot: http://www.flickr.com/photos/99632138@N00/4271437732/sizes/o/

  17. Abdullah Al Mamun Says:

    Great thanks! really time saver. :-)

  18. Quick Facts Says:

    Maybe you should edit the post name title Agronesia » Blog Archive » Notepad++ HTML editing tag insertion (surround) plugin to more specific for your blog post you make. I loved the blog post yet.

  19. Syperoyap Says:

    SEO оптимизатор. Обеспечиваю оптимизацию сайтов. Стоимость работы от 50 у.е. в месяц.

    ICQ 625-466-909

    SEO раскрутка ресурса можно разделить на 2 части:
    1) Внутренняя оптимизация - это работа с наполнением сайта; тексты, html-код, структура ресурса и тд.
    Всё это необходимо привести в соответствие с требованиями релевантности поисковиков.
    2) Внешние факторы - это качество и количество ссылающихся ресурсов на Ваш сайт. Чем больше ресурсов ссылаются (ставят ссылки, рекомендуют) Ваш ресурс, тем важнее он выглядит в глазах поисковика.
    Важно, проводив SEO для сайта, не использовать запрещенные методы продвижения, иначе это может негативно сказаться на позициях вплоть до полного исключения сайта из индекса поисковой системы.

    Вот, вкратце, из чего состоит SEO, как продвижение сайта. Это всё конечно поверхностно, потому как каждый из этих пунктов имеет множество этапов, нюансов и правил.

    Особый пакет услуг SEO. Стоимость от 300 у.е.

    Особый пакет услуг – это разовый комплекс работ над вашим сайтом, направленый на то, чтобы сделать его наиболее оптимизированным под поисковые системы. Приблизительные сроки выполнения - 4-6 недель.

    Этап 1
    Анализ SEO состояния сайта
    Обзор сайта, планирование оптимизации и продвижения
    Анализ сайтов “конкурентов”
    Анализ и подбор ключевых слов
    Оптимизация мета-данных (подбор ключевых слов, заголовков, описаний)
    Оптимизация кода (первое предложение, тэги H1, жирный и курсив текст и т.д.)
    Интегрирование системы для обмена ссылками

    Этап 2
    Создание карты сайта
    Создание динамической RSS ленты новостей
    Оптимизация ссылок (Search Engine Friendly URLs)
    Проверка кода на соответствие стандартам W3C

    Этап 3
    Регистрация в поисковых системах и каталогах
    Оптимизация контента

  20. free DSi points Says:

    There is some solid information on this blog. I like how you put things. I’ve added you to my Google Reader RSS subscriptions and will continue reading your work. I did have a problem with how quick this post loaded. Might be an issue to fix.

  21. bet at home srbija Says:

    I am sure that i will come back to your site. Well written articles !

  22. tiarah6 Says:

    hi, how are you?

  23. mattress disposal Says:

    I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz reply back as I’m looking to create my own blog and would like to know wheere u got this from. thanks!

  24. остекление, окна, остекление балконов, остекление лоджий, остекление помещений, ремонт окон, Says:

    Остекление дома, помещений, балконов, офиса, дачи

  25. Tony Scialdone Says:

    Thanks SO much for your explanation. I installed the plugin, but couldn’t figure out how to make it work. I’ve got it running, and have added a few tags as well.

  26. EfferTeeway Says:

    Бесплатная RPG онлайн игра Техномагия завоевала интерес тысяч пользователей различной возрастной категории оригинальным интерфейсом, геймплеем, игровым движком. Игра в стиле фэнтези совместила в себе элементы стратегии, тактики и логики. Мир Техномагии красочен и ярок, графика основана на флеш-анимации, при этом ее системные требования минимальны.

  27. выкройки юбок, красивые юбки, Says:

    : Познавательная публикация о юбках 2010.

  28. godaddy Says:

    godaddy…

    [...]Agronesia » Blog Archive » Notepad++ HTML editing tag insertion (surround) plugin[...]…

  29. τρελες προσφορες Says:

    τρελες προσφορες…

    [...]Agronesia » Blog Archive » Notepad++ HTML editing tag insertion (surround) plugin[...]…

  30. Navigacija Says:

    I just like the helpful info you provide in your articles. I?ll bookmark your blog and check again here regularly. I’m slightly sure I?ll be told many new stuff proper here! Best of luck for the following!

  31. swifejerome Says:

    I’m sure the best for you online shopping online

  32. Sunray Studio - создание и раскрутка сайтов Says:

    Sunray Studio - создание и раскрутка сайтов…

    [...]Agronesia » Blog Archive » Notepad++ HTML editing tag insertion (surround) plugin[...]…

  33. Sunray Studio - создание и раскрутка сайтов Says:

    I’m extremely inspired together with your writing skills as neatly as with the structure on your blog. Is that this a paid subject or did you customize it your self? Either way stay up the excellent quality writing, it’s uncommon to see a nice blog like this one nowadays..

Leave a Reply