1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
// Localization
final static String NotEditableMessage = jEdit.getProperty("macro.rs.general.ErrorNotEditableDialog.message", "Buffer is not editable");
void composeTag()
{
caret = textArea.getCaretPosition();
text = textArea.getSelectedText();
if(text == null || text.length()==0 )
{
textArea.selectWord();
text = textArea.getSelectedText();
if(text == null || text.length()==0 )
return;
}
sb = new StringBuffer();
sb.append("<").append(text).append(">");
sb.append("</").append(text).append(">");
textArea.setSelectedText(sb.toString());
textArea.setCaretPosition(caret + text.length() + 2);
}
composeTag();
/*
Macro index data (in DocBook format)
<listitem>
<para><filename>Compose_Tag.bsh</filename></para>
<abstract><para>
Creates an HTML tag from the selected text or select current word and then creates the tag.
</para></abstract>
</listitem>
*/
|