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.