cheditor5 표만들기 등등 채택완료
신아그니
2년 전
조회 2,574
cheditor5에서 표만들기 및 사진 등 버튼을 누르면
cheditor.js 에 오류가 표기되는데
iframe.contentWindow.init.call(self, iframe, popupAttr.argv || null); 이부분이 오류가 납니다.
콘솔창에서는
Uncaught TypeError: Cannot read properties of undefined (reading 'call') at HTMLIFrameElement.popWinResizeHeight (cheditor.js:4664:43)
이런오류가 발생합니다
어떤 이유이며 해결방법이 있을까요?
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
2년 전
cheditor.js파일에서 contentWindow 속성이 정의 되지 않아서 발생 하는 오류 인 것으로 알고 있습니다.
그누보드 최신버전이 아니실 경우 최신버전의 cheditor.js 파일을 교체해보세요..
교체후에도 같은 증상일 경우 아래 cheditor.js 파일에서 iframe.contentWindow.init 함수를 찾아서 아래와 같이 수정후 테스트를 해보시면 될 것 같습니다.
</p>
<p>if (typeof iframe.contentWindow.init === 'function') {
iframe.contentWindow.init.call(self, iframe, popupAttr.argv || null);
} else {
// init 함수가 없는 경우 예외 처리
console.error('init function is not defined in cheditor.js');
}
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
[code]
if (typeof iframe.contentWindow.init === 'function') {
iframe.contentWindow.init.call(self, iframe, popupAttr.argv || null);
} else if (typeof iframe.contentWindow.init !== 'undefined') {
// init 함수가 정의되었지만 function이 아닌 경우 예외 처리
console.error('init is not a function in cheditor.js');
} else {
// init 함수가 정의되지 않은 경우 예외 처리
console.error('init function is not defined in cheditor.js');
}
[/code]
위와 같이 해도 안되신다면 다른 에디터를 사용해 보시는게 어떨지요