February 11, 2012 at 3:42 pm #10003
Stefan
Participant
Yes i do it the same way:
#title = "Enclose selection";
#tooltip = "Enclose an selection with an sign";
// Select some text and execute this macro to put an sign
// in front and at the end of the selected text;
//mySign = "\%"
mySign = prompt( "Enter sign to enclose selection:", "\%" );
selText = document.selection.Text;
outText = mySign + selText + mySign;
//alert(outText);
document.selection.Text = outText;
Should be easy to modify this code
and replace mySign with LeadingSign and TrailingSign :-)