wrap selection with tag

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
jozefk
Posts: 5
Joined: Fri Apr 26, 2013 9:10 am

wrap selection with tag

Post by jozefk »

Hi,
I don't see how can I wrap the selection to <span> or <div> tags for example. I see other tags available on toolbar but there is no span or div. Or is there some keyboard shortcut I could use and start typing the tags around selection?
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: wrap selection with tag

Post by Aivars »

You can create a snippet for this (Options -> Edit Library)

Insert before caret: <%[Prompt message]=[tag]%>
Insert after caret: </%[Prompt message]=[tag]%>
Blumentals Software Programmer
jozefk
Posts: 5
Joined: Fri Apr 26, 2013 9:10 am

Re: wrap selection with tag

Post by jozefk »

That works! Thank you.
Is it also possible to have both, opening and closing tags edited in same time. Like: after I enter the tag I select "div" in <div> and start typing "span" and have the "div" in </div> changed to "span" as I type? Maybe I am asking too much but some other editors does this.
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: wrap selection with tag

Post by Aivars »

Currently only one selection/cursor is possible.
Blumentals Software Programmer
Post Reply