0
부모 템플릿에 CKEditor 인스턴스가 있고 onclick 후에 해당 텍스트 영역에 iframe의 데이터를 삽입하고 싶습니다. 그 일을 내가 어떻게 할까? 이것은 지금까지 제 코드입니다. 내가 뭘 잘못하고 있니?iframe에서 부모 윈도우의 CKEditor 인스턴스에 어떻게 액세스합니까?
<br><input type="button" id="change_text" value="Change Text"` onclick="myFunction()">
<script>
function myFunction() {
parent.document.body.style.backgroundColor = "red"; //This line works, setting parent page background to red
parent.document.CKEDITOR.instances['id_body'].setData($('input:radio[name=temp_name]:checked').val()); //Radio button value from iframe page. This line does not work
}
</script>