배추기본스킨에서 SWF업로더 cheditor 에서 본문삽입 클릭하면 아무 반응이 없습니다. 정보
배추기본스킨에서 SWF업로더 cheditor 에서 본문삽입 클릭하면 아무 반응이 없습니다.본문
안녕하세요?
게시판 배추스킨설정에서 SWF업로더 geditor로 선택 했을 때는 잘 올라 갑니다.
cheditor 에서는 본문삽입 클릭하면
textarea style="display: none" id="tx_wr_content" name="wr_content">{1번 이미지 없음}</textarea
이곳으로만 올라가고 에디터에서는 아무 변화가 없습니다.
textarea에 올라가 있어서 그런지 글저장을 클릭하면 뷰페이지에서는 제대로 보입니다.
input id="btnInsert" onclick="function onclick()
{file_to_editor();}" value="본문삽입" type="button">
이 메뉴를 클릭하면 아래 함수가 실행 되는것 같습니다.
스킨>보드>mw.basic>mw.swfupload>handlers.js 의
function file_to_editor() {
try {
var files_list = document.getElementById("uploaded_file_list");
var html = '';
if (!files_list.value) {
alert('파일을 선택해주세요.');
return false;
};
for (var i=0; i<files_list.options.length; i++) {
if (files_list.options[i].selected == true) {
var file = get_file_info(files_list.options[i].value);
var path = board_file_path + '/' + file.bf_file;
var pattern = /\.(jpg|png|gif)$/i;
if (pattern.test(file.bf_file)) {
if (wr_id) {
html = "{이미지:" + file.bf_no + "}";
} else {
html = "{이미지:" + i + "}";
}
} else {
alert("이미지만 삽입 할 수 있습니다.");
//path = "download.php?bo_table=" + bo_table + "&filename=" + file.bf_file + "&filesource=" + file.bf_source + "";
//html += "<a href=\"" + path + "\">" + file.bf_source + "</a><br/>\n";
}
};
};
insert_editor(html);
} catch (ex) {
this.debug(ex);
};
}
function insert_editor(html) {
try {
if (typeof geditor_wr_content != "undefined") {
if (geditor_wr_content.get_mode() == "WYSIWYG") {
document.getElementById("geditor_wr_content_frame").contentWindow.document.body.focus();
geditor_wr_content.get_range();
html = html + "<br />";
} else if (geditor_wr_content.get_mode() == "TEXT") {
html = html + "\n";
} else {
html = html + "<br />";
}
geditor_wr_content.insert_editor(html);
} else {
document.getElementById("wr_content").value += html + "\n";
}
} catch (ex) {
this.debug(ex);
};
}
이부분을 봐도 어떻게 해야 할지 모르겠습니다.
고수분들의 도움을 기대합니다.
감사합니다.
[출처] 배추빌더 - http://g4.miwit.com/bbs/board.php?bo_table=g4_qna&wr_id=52507
게시판 배추스킨설정에서 SWF업로더 geditor로 선택 했을 때는 잘 올라 갑니다.
cheditor 에서는 본문삽입 클릭하면
textarea style="display: none" id="tx_wr_content" name="wr_content">{1번 이미지 없음}</textarea
이곳으로만 올라가고 에디터에서는 아무 변화가 없습니다.
textarea에 올라가 있어서 그런지 글저장을 클릭하면 뷰페이지에서는 제대로 보입니다.
input id="btnInsert" onclick="function onclick()
{file_to_editor();}" value="본문삽입" type="button">
이 메뉴를 클릭하면 아래 함수가 실행 되는것 같습니다.
스킨>보드>mw.basic>mw.swfupload>handlers.js 의
function file_to_editor() {
try {
var files_list = document.getElementById("uploaded_file_list");
var html = '';
if (!files_list.value) {
alert('파일을 선택해주세요.');
return false;
};
for (var i=0; i<files_list.options.length; i++) {
if (files_list.options[i].selected == true) {
var file = get_file_info(files_list.options[i].value);
var path = board_file_path + '/' + file.bf_file;
var pattern = /\.(jpg|png|gif)$/i;
if (pattern.test(file.bf_file)) {
if (wr_id) {
html = "{이미지:" + file.bf_no + "}";
} else {
html = "{이미지:" + i + "}";
}
} else {
alert("이미지만 삽입 할 수 있습니다.");
//path = "download.php?bo_table=" + bo_table + "&filename=" + file.bf_file + "&filesource=" + file.bf_source + "";
//html += "<a href=\"" + path + "\">" + file.bf_source + "</a><br/>\n";
}
};
};
insert_editor(html);
} catch (ex) {
this.debug(ex);
};
}
function insert_editor(html) {
try {
if (typeof geditor_wr_content != "undefined") {
if (geditor_wr_content.get_mode() == "WYSIWYG") {
document.getElementById("geditor_wr_content_frame").contentWindow.document.body.focus();
geditor_wr_content.get_range();
html = html + "<br />";
} else if (geditor_wr_content.get_mode() == "TEXT") {
html = html + "\n";
} else {
html = html + "<br />";
}
geditor_wr_content.insert_editor(html);
} else {
document.getElementById("wr_content").value += html + "\n";
}
} catch (ex) {
this.debug(ex);
};
}
이부분을 봐도 어떻게 해야 할지 모르겠습니다.
고수분들의 도움을 기대합니다.
감사합니다.
[출처] 배추빌더 - http://g4.miwit.com/bbs/board.php?bo_table=g4_qna&wr_id=52507
댓글 전체