사이트 내 전체검색
그누보드
[팁] 그누보드 게시판 편집기 editor 2개 이상 붙이기
로빈아빠
https://cmd.kr/gnu/483 URL이 복사되었습니다.

본문

write.php 가 된 상태에서나, 편집기를 두번 출력한 상태에서 는 동작이 안된다.

이경우 js를 한번더 뿌려주어야 한다.. (플러그인마다 수정 해야한다.)

 

<script src="/a/plugin/editor/smarteditor2/js/HuskyEZCreator.js"></script>

<script>var g5_editor_url = "/a/plugin/editor/smarteditor2", oEditors = [];</script>

<script src="/a/plugin/editor/smarteditor2/config.js"></script>

<?

echo editor_html('wr_content1', $content, $is_dhtml_editor);

echo editor_html('wr_content2', $content, $is_dhtml_editor);

echo editor_html('wr_content3', $content, $is_dhtml_editor);

 

?>

---------------------------

 

문제의 원인은 플러그인/편집기/editor.lib.php의 $js 함수 때문이다.. 

냑에 버그로 신고해도 이럴 경우가 발생되지않을꺼라고 우길 가능성이 높아서 그냥 수정해서 사용해야 겠다/

=====================================================

    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>";

        $js = false;

    }

 

 

댓글목록

등록된 댓글이 없습니다.

그누보드
190 (1/4P)

Search

Copyright © Cmd 명령어 18.222.181.216