- AuthorPosts
- November 24, 2009 at 3:43 am #7850robbenMember
(function() {
var word = document.selection.Text;
var tag=prompt( “start_tag”, “p” );
//var end_tag=prompt( “end_tag”, “p” );
if (!tag) return;
var start_tag=”<"+tag+">“;
var end_tag=”"+tag+">“;
if (word == ”) {
document.selection.SelectLine();
var str = document.selection.Text;
if (str.replace(/s/g, ”) == ”) {
str = str.replace(/[rn]*/g, ”);
document.selection.Text = str;
return;
}
else {
str = str.replace(/[rn]*/g, ”);
str = str.replace(/^([s]*)([wW]+)/, ‘$1’ + start_tag + ‘$2’ + end_tag + ‘rn’);
var cp = str.indexOf(start_tag);
document.selection.Text = str;
document.selection.CharLeft(false, str.length – cursorFix);
document.selection.StartOfLine();
document.selection.CharRight(false, cp + start_tag.length);
return;
}
}
else {
word = start_tag + word.replace(/r*n/g, end_tag + ‘rn’ + start_tag) + end_tag;
document.selection.Text = word;
return;
}})();
:-D :-D
February 2, 2010 at 9:16 am #8096horatioMemberEmEditor Macro Error:
Expected ‘;’
File: [path]
Line: 1
- AuthorPosts
- You must be logged in to reply to this topic.