write.skin.php 기준입니다. php 가 아니라 자바스크립트입니다.
스마트에디터는 아이프레임으로 불러오기 때문에 아이프레임 온로드 이후에 해당코드를 넣어야 합니다.
<script>
document.addEventListener("DOMContentLoaded", () => {
wr_content.nextSibling.onload = function() {
해당코드;
}
});
</script>
----------
oEditors.getById["wr_content"].exec("SET_IR", [""]);
// 에디터 내용 전부 삭제
oEditors.getById["wr_content"].exec("PASTE_HTML", ["그누보드 만만세"]);
// 커서 위치에 그누보드 만만세 입력
oEditors.getById["wr_content"].getIR();
// 에디터의 현재 내용 얻기
----------
1) 현재 커서 위치에 유튜브를 넣으려면?
oEditors.getById["wr_content"].exec("PASTE_HTML", ["유튜브 아이프레임"]);
2) 내용물을 몽땅 지우고 유튜브를 넣으려면?
oEditors.getById["wr_content"].exec("SET_IR", ["유튜브 아이프레임"]);
3) 내용물을 유지시키면서 처움에 유튜브를 넣으려면?
saveData = oEditors.getById["wr_content"].getIR();
oEditors.getById["wr_content"].exec("SET_IR", ["유튜브 아이프레임" + saveData]);
4) 내용물을 유지시키면서 마지막에 유튜브를 넣으려면?
saveData = oEditors.getById["wr_content"].getIR();
oEditors.getById["wr_content"].exec("SET_IR", [saveData + "유튜브 아이프레임"]);
댓글 7개
그런데
document.addEventListener("DOMContentLoaded", () => {
1번위치
document.querySelector("#wr_content").style.height = "<?php echo $se2_height; ?>";
document.querySelector("#commentEditor iframe").onload = function() {
se2Custom = this["contentWindow"]["document"];
se2Custom.querySelector("body").style.backgroundColor = "#ffffff";
se2Custom.querySelector("#smart_editor2 .se2_text_tool .se2_multy").style.display = "<?php echo $upload_display; ?>";
se2Custom.querySelector("#smart_editor2 #se2_iframe").onload = function() {
this["contentWindow"]["document"].querySelector("body").insertAdjacentHTML("beforebegin", "<style>img { max-width:100%; }</style>");
}
}
} );
</script>
<!-- /wittazzurri_5 -->
wr_content.nextSibling.onload = function() {
oEditors.getById["wr_content"].exec("PASTE_HTML", ["그누보드 만만세"]);
} 요거를
1번 위치부터 한줄한줄 넣어봐도 만만세는 커녕 개미한마리 안보이는데요? ㅎ
게시글 목록
| 번호 | 제목 |
|---|---|
| 24149 | |
| 24140 | |
| 24133 | |
| 24125 | |
| 24119 | |
| 24109 | |
| 24105 | |
| 24101 | |
| 24093 | |
| 24089 | |
| 24077 | |
| 24074 | |
| 24071 | |
| 24070 | |
| 24067 | |
| 24056 | |
| 24050 | |
| 24046 | |
| 24043 | |
| 24040 | |
| 24037 | |
| 24036 | |
| 24035 | |
| 24034 | |
| 24021 | |
| 24017 | |
| 24005 | |
| 24002 | |
| 23990 | |
| 23980 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기