1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
|
function bbcode(theForm, theTag, promptText) {
if ( normalMode(theForm) || (bbcode=="IMG")) {
var selectedText = getSelectedText(theForm);
if (promptText == '' || selectedText != '') promptText = selectedText;
switch (theTag) {
default: inserttext = prompt(((theTag == "IMG") ? (img_prompt) : (tag_prompt)) + "\n[" + theTag + "]xxx[/" + theTag + "]", promptText); break;
case 'youtube': inserttext = prompt(youtube_prompt + "\n[" + theTag + "]Ihre YouTube ID[/" + theTag + "]", promptText); break;
case 'myvideo': inserttext = prompt(myvideo_prompt + "\n[" + theTag + "]Ihre MyVideo ID[/" + theTag + "]", promptText); break;
case 'googlevideo': inserttext = prompt(googlevideo_prompt + "\n[" + theTag + "]Ihre GoogleVideo ID[/" + theTag + "]", promptText); break;
}
if ( (inserttext != null) && (inserttext != "") ) {
addText("[" + theTag + "]" + inserttext + "[/" + theTag + "]", "", false, theForm);
} |