BBCodeXtra – Custom Tags

Custom tags: management

Custom tags is a feature introduced in version 0.3.0. You can manage custom tags from the Preferences window, available from the Extension Manager window of from the context menus.

For each custom tag you need to provide:

  • the item name (it will be displayed in the Custom Tags menu)
  • the code to be used

Custom tags: examples

Text and symbols

You can create a custom tag to insert a fixed plain text or symbols like ©, ® e ™ (both HTML entity or UTF characters).

Item name: copyright
Code: ©

Use selected text or clipboard

There are two variables available:

  • _clipboard_: clipboard content
  • _selection_: selected text

Example 1
Create an XHTML img tag, assign class imagepost and use the URL saved in the clipboard as src.

Item name: image clipboard
Code: <img src="_clipboard_" class="imagepost" />

When you select the custom tag image clipboard, the _clipboard_ variable will be automatically replaced with the clipboard’s content.

Example 2
Create an XHTML link, using selected text as URL and “link” as text.

Item name: link selection
Code: <a href="_selection_">link</a>

When you select the custom tag link selection, the _selection_ variable will be automatically replaced with the selected text.

Example 3
Create an XHTML div, using the clipboard as content and selected text as class name.

Item name: custom div
Code: <div class="_selection_">_clipboard_</a>