XML/HTML Tag

From TED Notepad
Revision as of 20:45, 25 April 2011 by Jsimlo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This section is up to date for TED Notepad version 6.3.1.0.
Control page Control:feature:XML/HTML Tag

XML/HTML Tag.. (Ctrl+Shift+H)

Asks for a tag Name and for its Attributes. Then encloses the selection with a specified XML/HTML tag (including the attributes if given). The tag may be Empty which means that only the starting tag is generated with a slash at its end according to XML specification (e.g. <br />). In this case, if a selection is found, the tag is placed at the end of such selection.

If the selection does not contain newline, it is enclosed tightly. However, if the selection does contain newlines, it is enclosed with additional newlines after the starting and before the closing tag.

The selection always persists the operation, but it excludes the generated starting and closing tags, thus selecting the same text as before.

Note: The Persistent selection setting does not apply to this tool (as described in chapter Tools page of the Settings dialog).

Example:
There is no place like 127.0.0.1!
Result, using Name: a and Attributes: href="http://127.0.0.1/":
There is no place like <a href="http://127.0.0.1/">127.0.0.1</a>!
Example:
There is no place
like 127.0.0.1!
Result:
<a href="http://127.0.0.1/">
There is no place
like 127.0.0.1!

</a>

Tip: If you need to enclose selection with more general phrases, use the Enclose Selection tool instead.

Tip: In Settings dialog, on the Tools page, there are options to keep or reset the Attributes and Empty fields every time the tool dialog is invoked. You can use them to support your habits or ease routines of your current tasks.

See also Enclose Selection tool.