Wrapping selected text with snippets

April 21st, 2008 by HTML-Kit Support      Tags: HTML-Kit Tools       Views: 3724
Support Home     Next: Tools update 20080423.....     Previous: Tools update 20080418
VN:F [1.7.3_972]
Rating: 0.0/5 (0 votes cast)
 

Snippets in HTML-Kit Tools can be customized to incorporate the selected text as follows:

  • Open a document and select the text that you’d like to use in the new snippet.
  • Select "File > Save As > Save as Snippet" from the main menu.
  • Enter a title for the snippet and note the "Name" field.
  • Check "Edit in snippet manager" option and click "OK"
  • When the "Snippet Manager" dialog appears, select the snippet name (as listed in the "Name" field above).
  • Update the snippet code to include "{{SELTEXT}}" and "useseltext=1″ as shown below:
    #@begin-text "default" [useseltext=1, movecursor=1]

    text before selection|

    {{SELTEXT}}

    text after

    #@end-text "default"

  • Click "OK" to save changes

Now you can use this new snippet to wrap the selected text.

  • Open a document and select the target text.
  • Press Ctrl+Shift+I to open "Insert Snippet" dialog.
  • Click your snippet name. The selected text will be wrapped in "before" and "after" text.

Note that the "|" character is used to indicate caret location. It is optional and can be removed along with the "movecursor=1″ setting.

For more information on "begin-text" – "end-text" blocks in HTML-Kit Tools, please see Custom Actions.

Was this article helpful?
This did not answer my questionThis answered my question (-1 rating, 3 votes)
Loading ... Loading ...
Share this on:
  • Twitter
  • Digg
  • StumbleUpon
  • Facebook
  • MySpace
  • del.icio.us
  • Sphinn
  • LinkedIn
  • Google Bookmarks
  • Live
  • Yahoo! Buzz
  • email
  • Print
 
Do you have a question that requires a reply? Please post it here for a timely and friendly reply.
 
If you have a comment, you can post it below. Not all comments are read, so be sure to use the support forum instead if you need an answer.
 
Leave a Comment or use the support forum if you have a question.

 

© 2009 HTML-Kit.com. All Rights Reserved.  |  Privacy Statement   
HTML design aid