[CHEditor 5.1.9] template.xml 파일 로딩 오류 패치 코드 > 기술자료 | 해피정닷컴

[CHEditor 5.1.9] template.xml 파일 로딩 오류 패치 코드 > 기술자료

본문 바로가기

사이트 내 전체검색

[CHEditor 5.1.9] template.xml 파일 로딩 오류 패치 코드 > 기술자료

Editor [CHEditor 5.1.9] template.xml 파일 로딩 오류 패치 코드

페이지 정보


본문

특정 IE에서 template.xml 파일 로딩 오류가 발생하는 문제를 패치하기 위한 코드입니다.
수정 파일: cheditor.js
수정 함수: loadTemplate, getCDATASection
위 두 개의 수정 함수를 아래 것으로 교체해 주십시오.

    loadTemplate : function (xmlDoc) {
        var cdata, container, dragHandle, html, modalFrame, popupWindow, tmpDiv, tmpl, toolbar;
        tmpl = xmlDoc.getElementsByTagName('Template').item(0);
        if (!tmpl) {
            throw 'Template 노드를 설정할 수 없습니다.';
        }
        cdata = tmpl.getElementsByTagName('Container').item(0).getElementsByTagName('Html').item(0);
        if (!cdata) {
            throw 'XML CDATA 오류';
        }
        html = this.getCDATASection(cdata);
        tmpDiv = document.createElement('div');
        tmpDiv.innerHTML = html;
        container = tmpDiv.firstChild;

        toolbar = tmpl.getElementsByTagName('Toolbar').item(0);
        this.createEditorElement(container, toolbar);

        cdata = tmpl.getElementsByTagName('PopupWindow').item(0).getElementsByTagName('Html').item(0);
        if (!cdata) {
            throw 'XML CDATA 오류';
        }
        html = this.getCDATASection(cdata);
        tmpDiv.innerHTML = html;
        popupWindow = tmpDiv.firstChild;
        this.cheditor.popupElem = popupWindow;

        dragHandle = popupWindow.firstChild;
        this.cheditor.dragHandle = dragHandle;
        this.cheditor.popupTitle = dragHandle.getElementsByTagName('label')[0];
        this.cheditor.popupFrameWrapper = dragHandle.nextSibling;
        container.appendChild(popupWindow);

        modalFrame = document.createElement('div');
        modalFrame.className = 'cheditor-modalPopupTransparent';
        this.cheditor.modalBackground = modalFrame;
        this.cheditor.modalBackground.id = 'popupModalBackground';
        this.cheditor.modalBackground.className = 'cheditor-popupModalBackground';
        container.parentNode.insertBefore(modalFrame, container);

        this.cheditor.htmlEditable = document.createElement('iframe');
        this.cheditor.htmlEditable.style.display = 'none';
        this.cheditor.htmlEditable.style.width = '1px';
        this.cheditor.htmlEditable.style.height = '1px';
        this.cheditor.htmlEditable.style.visibility = 'hidden';
        container.appendChild(this.cheditor.htmlEditable);
    },
    
    getCDATASection : function (node) {
        var text = node.textContent || node.text;
        text = text.replace(/\n/g, '');
        text = text.replace(/(\s+?)<([^>]*)>/g, '<$2>');
        text = this.trimSpace(text);
        return text;
    }, 



자료출처
https://groups.google.com/forum/#!topic/chsoft/xsThh4BL9FQ 

댓글목록

등록된 댓글이 없습니다.


Total 2,643건 33 페이지
  • RSS
기술자료 목록
2003
영카트   10761  2017-06-22 17:17  
2002
Secure   10512  2017-06-15 14:32  
2001
그누보드   12674  2017-06-15 11:52 ~ 2021-07-08 07:58  
2000
Secure   11056  2017-06-14 13:45  
1999
그누보드   15547  2017-06-09 17:39  
1998
영카트   15740  2017-06-08 03:35  
1997
etc쇼핑몰   10717  2017-06-07 13:40  
1996
그누보드   15026  2017-06-02 00:55 ~ 2018-07-06 11:36  
1995
Secure   17525  2017-06-01 03:31  
1994
그누보드   13036  2017-05-30 03:39  
1993
그누보드   16274  2017-05-29 23:19 ~ 2019-08-12 11:18  
1992
그누보드   15685  2017-05-29 18:49 ~ 2017-11-10 06:17  
1991
PHP   13410  2017-05-26 17:29  
열람
Editor   13800  2017-05-25 18:08  
1989
Secure   15825  2017-05-25 00:43  
1988
그누보드   14164  2017-05-22 11:45 ~ 2017-09-15 00:00  
1987
일반   10638  2017-05-19 17:31  
1986
영카트   15534  2017-05-19 15:03 ~ 2022-02-07 15:06  
1985
영카트   11104  2017-05-19 14:45  
1984
그누보드   11084  2017-05-18 14:44  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 1동 222호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 제2024-대전대덕-0405호 [사업자등록확인]  
Copyright 2001~2025 해피정닷컴. All Rights Reserved.