1
CKEditor를 사용 중이고 CKEditor iframe 창에서 onClick
이벤트에 대한 작업을 수행하고 싶습니다. 즉 CKEditor의 편집 가능 영역입니다.CKEditor iframe에 onClick 이벤트를 추가하는 방법
CKEDITOR.instances['ckEditor'].on('contentDom', function() {
this.document.on('click', function(event){
// calling some other function or some logic
});
});
그러나 위의 코드는 처음 CKEditor iframe을 클릭했을 때만 작동했습니다. 왜 그렇게? html 페이지의 다른 요소를 클릭 한 다음 CKEditor iframe을 다시 클릭하면 더 이상 작동하지 않습니다.
스크립트가 완벽하게 작동합니다. CKEditor 값의 인스턴스로 편집기 값을 변경했습니다. – Dhiraj