Mmenu.js 사용시 에디터 2번출력 에러

Mmenu.js 사용시 에디터 2번출력 에러

QA

Mmenu.js 사용시 에디터 2번출력 에러

답변 1

본문

안녕하세요.

 

mmenu.js (http://mmenu.frebsite.nl/) 사용시 (페이지 내 아래 스크립스 사용시)

 

 

  $("#mmenu").mmenu({

    offCanvas : {

    position  : "right",

    zposition : "front"

    }

  }) 

 

 

아래 캡쳐처럼 에디터(Smart Editor2)가 두번 출력되는 기이한 현상에 대한 수정방법이 도무지 

플러그인폴더/에디터 js 파일을 뒤져봐도 ..

jquery.mmenu.js 를 뒤져봐도.. (http://mmenu.frebsite.nl/mmenu/js/jquery.mmenu.min.all.js?v=5.0.1)

 

핵노답입니다.

 

살려주세요...

 

 

dad686c1fab808e76c7c13261d0c1ab1_1427375350_6155.png
 

이 질문에 댓글 쓰기 :

답변 1

이런 문제는 대부분 중복으로 로드해 오기 때문에 생깁니다.

 

/plugin/editor/smarteditor/config.js 파일을 수정해 보세요.

 

 

var get_id = $(this).attr("id");

 

if( !get_id || $(this).prop("nodeName") != 'TEXTAREA' ) return true; 

 

위와 같이 되어 있는 소스를 아래와 같이 바꿔보세요.

 


            var get_id = $(this).attr("id");
 
            var editor_chk = $(window).data('smarteditor'+get_id);
            if( typeof editor_chk !== 'undefined' ){  //id 를 체크하여 중복으로 불러오는것을 방지한다.
                return true;
            }
            $(window).data('smarteditor'+get_id, true);
 
            if( !get_id || $(this).prop("nodeName") != 'TEXTAREA' ) return true; 
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 9
© SIRSOFT
현재 페이지 제일 처음으로