/**** ÆíÁý±â⠱⺻¼ÂÆà S ****/
function psk_stylesheet(StyleFile){
/*this['psk_Editer'].document.designMode = "On";
if(this['psk_Editer'].document.readyState == "complete"){
this['psk_Editer'].document.createStyleSheet(StyleFile);
}*/
this['psk_Editer'].document.designMode = "On";
if(this['psk_Editer'].document.readyState == "complete"){
if (this['psk_Editer'].document.createStyleSheet){
this['psk_Editer'].document.createStyleSheet(StyleFile);
}else {
$("head").append($(""));
}
}
}
/**** ÆíÁý±â⠱⺻¼ÂÆà E ****/
/**** ÆíÁý±ââ ¸ðµå Àüȯ S ****/
function psk_edit_mode(){
var mode;
if(document.all.HTML.checked == true) mode = "HTML";
else mode = "EDITOR";
if(mode == "EDITOR"){
iText = this['psk_Editer'].document.body.innerText;
this['psk_Editer'].document.body.innerHTML = iText;
} else if(mode == "HTML"){
iHTML = this['psk_Editer'].document.body.innerHTML;
this['psk_Editer'].document.body.innerText = iHTML;
}
}
/**** ÆíÁý±ââ ¸ðµå Àüȯ E ****/
/**** À̹ÌÁö ³Ö±â ****/
function psk_image_up(id){
if(document.all.HTML.checked == true){
alert("HTMLÆíÁý ÇØÁ¦ÈÄ »ç¿ëÇϼ¼¿ä. ");
return false;
}
// insert image //
window.frames['psk_Editer'].focus();
var gValues = showModalDialog('../nboard/editer/img_library.php', 'image', 'dialogWidth:440px; dialogHeight:160px; status:no ; center: Yes; scroll: No;');
if(gValues != null){
if(gValues.Type == 'Geturl') imgSrc = gValues.Src;
else if(gValues.Type == 'Upload')
{
UpImages[UpImages.length] = gValues.Src;
imgSrc = gValues.Src;
}
this['psk_Editer'].document.execCommand('insertimage', false, imgSrc);
}
}
function html_check(){
if(document.all.HTML.checked == true){
alert("HTMLÆíÁý ÇØÁ¦ÈÄ »ç¿ëÇϼ¼¿ä. ");
return false;
}
}
/**** ÀϹÝÀûÀÎ HTML ÅÂ±× S ****/
function psk_click(type, sender){
if(document.all.HTML.checked == true){
alert("HTMLÆíÁý ÇØÁ¦ÈÄ »ç¿ëÇϼ¼¿ä. ");
return false;
}
psk_Editer.focus();
if(type == 'link'){
// Hyperlink //
this['psk_Editer'].document.execCommand('createlink');
Editer = eval(window.frames['psk_Editer'].document.body);
Atag = Editer.getElementsByTagName("A");
if(Atag){
for(i=0; i