 |

rowdydnc
New User
Aug 31, 2004, 9:53 AM
Post #1 of 1
(1852 views)
Shortcut
|
|
Great Tool! (Add Target To Anchor Tags)
|
Can't Post
|
|
Your organization has built possibly the best rich text editor around! Just wanted to say Kudos and also add that if anyone is seeking a way (if they are using the tool for CMS etc...) to grab the anchor tags and append a target to them by default (to keep your site open in it's own window) here is a bit you can add at line 619 in the editor.js file or right after you find the code if (tagName == 'a') { tagBody = tagBody.replace(/(href\s*=\s*.)[^*]*(\*\*\*)/, "$1$2"); } for IE absolute url replacement. Here's the snippet ... if (tagName == 'a') { reEx = /">/gi; tagBody = tagBody.replace(reEx, '"target="_new">'); }//added href tag to add target for anchors ... I found this to work well and be quite handy. Thanks again for your hard work guys this tool is awesome!
|
|
|  |
|