Custom Technorati-Quicktags.. How’s this look?
-
I wanted a way to add technorati tags neatly at the end of posts.Check this Pic to see what a screenshot I also wanted to add tags for words I didnt mention in the post. basically I wanted to add whatever tags that came to mind when I was done posting. I took a look at this applescript thing for marsEdit and looked at the code it spit out. I hacked up the quicktags.js and came up with this.
I really dont know what Im doing =) So could you look at this and let me know if theres a quicker way to do this? I saw the <ttag> plugin but this bypasses the plugin and looks neater (to me).
Here is a custom “techno” button plus an edited “link” button
edButtons[edButtons.length] =
new edButton("ed_techno"
,"techno"
,"<div class="technorati">Technorati Tags:"
,"</div>"
,"t"
);edButtons[edButtons.length] =
new edButton("ed_link"
,"link"
,""
,""
,"a"
); // special case.
Below is the edited link popup window
function edInsertLink(myField, i, defaultValue) {
if (!defaultValue) {
defaultValue = "";
}
if (!edCheckOpenTags(i)) {
var URL = prompt("Enter Your TAG" ,defaultValue);
if (URL) {
edButtons[i].tagStart = "| <a href="http://www.technorati.com/tags/" + URL + ""rel="tag">" + URL + " </a>";
edInsertTag(myField, i);
}
}
else {
edInsertTag(myField, i);
}
}
Any thoughts? This is my 1st attemtp really at something like this (other than editing quicktags for a simple img thing).
- The topic ‘Custom Technorati-Quicktags.. How’s this look?’ is closed to new replies.