[thelist] regex to add html tags in TextPad

Lee Kowalkowski lee.kowalkowski at googlemail.com
Sat Oct 18 01:40:17 CDT 2008


2008/10/18 Joel D Canfield <joel at bizba6.com>:
> I'd like to select a group of words and use the replace function to
> surround it with tags. f'rinstance:
>
>    <p>This is some regular text with a few words emphasized in the
> middle.</p>
>
> I'd like to select 'a few words emphasized', click the magic button, and
> get
>
>    <p>This is some regular text with <em>a few words emphasized</em> in
> the middle.</p>

Hi Joel,

If you have to select the phrase manually, then you'd be better of
using TextPad's Clip Library.  There might already be one for HTML,
but if not, you can create a new one.  I'm sure you can include the
selection in the inserted text, and therefore wrapping a selection
with content is pretty trivial.

-- 
Lee



More information about the thelist mailing list