// HTML_Strong.bsh
void insertTag() {
tag = "strong";
caret = textArea.getCaretPosition();
text = textArea.getSelectedText();
if(text == null) text = "";
sb = new StringBuffer();
sb.append("<").append(tag).append(">");
sb.append(text);
sb.append("").append(tag).append(">");
textArea.setSelectedText(sb.toString());
if(text.length() == 0)
textArea.setCaretPosition(caret + tag.length() + 2);
}
insertTag();
// end HTML_Strong.bsh