function webEditor_dhtmlEdit(excute,values) { dhtml.focus(); if(document.selection){ // IE targetText = dhtml.document.selection.createRange(); targetText.execCommand(excute,"",values); } else { document.getElementById("obj_editor").contentWindow.document.execCommand(excute, false, values); } } function webEditor_setForeColor() { //SHOW MODALDIALOG WIDOW; var color = showModalDialog("./modules/webeditor_colorchart.php",0,"dialogHeight=230px;dialogWidth=280px; scrollbars=no; status=0; help=0"); //CHANGE FONT COLOR if(color!=null){ dhtml.document.execCommand('ForeColor','',color); } dhtml.focus(); } function webEditor_createLink() { dhtml.focus(); if(document.selection){ // IE if(dhtml.document.selection.type=="None") { alert("[None] ¼±ÅÃÇÑ ¿µ¿ªÀÌ ¾ø½À´Ï´Ù."); } else if(dhtml.document.selection.type=="Control") { alert("[Control] ¸µÅ©¸¦ °É ¼ö ÀÖ´Â »óŰ¡ ¾Æ´Õ´Ï´Ù."); } else if(dhtml.document.selection.type=="Text") { targetText = dhtml.document.selection.createRange(); targetText.execCommand('CreateLink',1,''); } } else { var mylink = prompt("Enter a URL:", "http://"); if ((mylink != null) && (mylink != "")) { document.getElementById("obj_editor").contentWindow.document.execCommand("CreateLink", false, mylink); } } } function SelectionCommand() { dhtml.focus(); targetText = dhtml.document.selection.createRange(); targetText.execCommand('CreateLink',1,''); if(targetText.parentElement().tagName=='A') { var href=targetText.parentElement().href; var data=targetText.text; targetText.execCommand('UnLink'); targetText.pasteHTML(""+data+""); } } function webEditor_insert(values) { dhtml.focus(); if(document.selection){ // IE targetText = dhtml.document.selection.createRange(); targetText.pasteHTML(values); } else { var sel = dhtml.document.getSelection(); if (sel.rangeCount) { var rng = sel.getRangeAt(0); var frag =document.createDocumentFragment(); var div = document.createElement("div"); div.innerHTML = values; while(div.firstChild) { frag.appendChild(div.firstChild); } rng.deleteContents(); rng.insertNode(frag); } } } function webEditor_changeMode(mode) { if(mode=='html') { document.bbs.main.value=dhtml.document.body.innerHTML; div_textarea.style.display=''; div_dhtml.style.display='none'; document.bbs.webeditor.value='no'; }else{ dhtml.document.body.innerHTML=document.bbs.main.value; div_dhtml.style.display=''; div_textarea.style.display='none'; document.bbs.webeditor.value='yes'; } } function webEditor_optimizing() { //CHECK CHAR if(dhtml.document.body.innerHTML=='') { alert('³»¿ëÀ» ÀÔ·ÂÇØÁֽʽÿä.'); return false; } //CHANGE LINK TARGET INTO _NEW for(var i=0;i