[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 22건 1 페이지
  • RSS
기술자료 목록
22
Adobe   8392  2022-03-21 15:11 ~ 2025-10-13 02:00  
21
MySQL   9722  2018-10-03 02:29  
20
PHP   10382  2018-08-20 15:51  
열람
Editor   14366  2017-05-25 18:08  
18
Oracle   40650  2016-02-03 21:19  
17
WindowsServer   15516  2016-01-09 23:05  
16
그누보드   19180  2015-11-16 14:19 ~ 2022-04-15 19:45  
15
Oracle   19934  2013-11-14 22:28  
14
MSSQL   18340  2013-08-28 10:20  
13
일반   31700  2013-05-08 00:45 ~ 2015-01-22 00:00  
12
영카트   22030  2013-01-07 18:34  
11
MSSQL   26866  2010-09-01 16:11 ~ 2020-03-11 09:55  
10
일반   16963  2009-10-31 15:46  
9
MySQL   15212  2009-07-23 09:57  
8
HTML   30783  2009-02-12 20:55  
7
Adobe   20591  2008-02-11 21:16  
6
그누보드   15901  2007-11-21 16:17  
5
전자결제   24753  2007-11-08 17:43 ~ 2019-01-11 19:20  
4
HTML   14507  2007-01-14 22:03  
3
일반   12821  2007-01-13 00:05 ~ 2018-11-15 05:43  

검색

해피정닷컴 정보

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

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