From b71f4c216fbe725af0b81ca42ab628d0f596b5a0 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sat, 11 Jul 2015 15:26:48 -0700 Subject: update CKeditor --- .../ckeditor/plugins/wsc/dialogs/ciframe.html | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html') diff --git a/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html b/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html index 292297d70..8e4e6bc9a 100644 --- a/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html +++ b/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html @@ -1,6 +1,6 @@ @@ -38,9 +38,26 @@ function sendData2Master() catch (e) {} } +function OnMessage (event) { + var message = event.data; + var destination = window.parent.parent; + destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ; +} + +function listenPostMessage() { + if (window.addEventListener) { // all browsers except IE before version 9 + window.addEventListener ("message", OnMessage, false); + }else { + if (window.attachEvent) { // IE before version 9 + window.attachEvent("onmessage", OnMessage); + } + } +} + function onLoad() { interval = window.setInterval( sendData2Master, 100 ); + listenPostMessage(); } -- cgit v1.2.1