버그 아닐까요? $html에 문자열이 안들어가네요
본문
버그 아닐까요? $html에 문자열이 안들어가네요
이거 어떻게 해결할 수 있을까요?
출처 : /plugin/editor/smarteditor2/editor.lib.php 에서...
아래를 거친 $html 결과에...
가장 끝의 \n</script>가 안들어가고 있습니다
제가 수정한게 아닌... 배포 그대로인데요... 이거 에러 잡을 수 있을까요?
if ($is_dhtml_editor && $js) {
$html .= "\n".'<script src="'.$editor_url.'/js/HuskyEZCreator.js"></script>';$html .= "\n".'<script>var g5_editor_url = "'.$editor_url.'", oEditors = [];</script>';
$html .= "\n".'<script src="'.$editor_url.'/config.js"></script>';
$html .= "\n<script>";
$html .= '
$(function(){
$(".btn_cke_sc").click(function(){
if ($(this).next("div.cke_sc_def").length) {
$(this).next("div.cke_sc_def").remove();
$(this).text("단축키 일람");
} else {
$(this).after("<div class=\'cke_sc_def\' />").next("div.cke_sc_def").load("'.$editor_url.'/shortcut.html");
$(this).text("단축키 일람 닫기");
}
});
$(".btn_cke_sc_close").live("click",function(){
$(this).parent("div.cke_sc_def").remove();
});
});';
$html .= "\n</script>"; // <=== 여기요... 여기에서.$html 에... \n</script>가 안들어가지네요
$js = false;
}
답변 2
버그게시판에 올려진 글에도 답변을 드렸지만 기본 코드에서 결과 화면에 정상적으로
해당 코드가 출력되고 있습니다.
http://demo.sir.co.kr/gnuboard5/bbs/write.php?bo_table=free
<script>
$(function(){
$(".btn_cke_sc").click(function(){
if ($(this).next("div.cke_sc_def").length) {
$(this).next("div.cke_sc_def").remove();
$(this).text("단축키 일람");
} else {
$(this).after("<div class='cke_sc_def' />").next("div.cke_sc_def").load("http://demo.sir.co.kr/gnuboard5/plugin/editor/smarteditor2/shortcut.html");
$(this).text("단축키 일람 닫기");
}
});
$(".btn_cke_sc_close").live("click",function(){
$(this).parent("div.cke_sc_def").remove();
});
});
</script>
위와 같이 출력이 되고 있습니다.
!-->문제가 되는 url을 적어 두는것이, 코드 문제로 묻는것 보다 훨씬 문제 해결에 도움이 되실 겁니다.
답변을 작성하시기 전에 로그인 해주세요.