From 0f8061094d7c3619b4a15c322d108cba21901765 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Tue, 16 Jun 2015 16:53:20 +0800 Subject: [PATCH] =?UTF-8?q?bug#2854:=E5=9C=A8=E5=90=8C=E4=B8=80=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=AD=E5=90=8C=E6=97=B6=E6=89=93=E5=BC=80=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E5=B8=96=E5=AD=90=E5=92=8C=E5=9B=9E=E5=A4=8D=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E7=9A=84=E7=BC=96=E8=BE=91=E5=99=A8=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=B8=96=E5=AD=90=E7=9A=84=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E4=B8=AD=E8=B4=B4=E5=9B=BE=EF=BC=8C=E5=9C=A8=E7=AC=AC?= =?UTF-8?q?=E4=BA=8C=E4=B8=AA=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=AD=E5=8D=B4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A4=9A=E4=B8=AA=E8=B4=B4=E7=9A=84=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/plugins/paste/paste.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/assets/kindeditor/plugins/paste/paste.js b/public/assets/kindeditor/plugins/paste/paste.js index f2d080dcf..943c0bbe7 100644 --- a/public/assets/kindeditor/plugins/paste/paste.js +++ b/public/assets/kindeditor/plugins/paste/paste.js @@ -293,7 +293,13 @@ https://github.com/layerssss/paste.js KindEditor.plugin('paste', function(K) { var editor = this, name = 'paste'; - var contentWindow = document.getElementsByTagName('iframe')[0].contentWindow; + //这样貌似多编辑器就不会冲突了 + if(editor.edit == undefined || editor.edit.iframe == undefined){ + return; + } + var contentWindow = editor.edit.iframe[0].contentWindow; + //var contentWindow = editor.iframeDoc; + //var contentWindow = document.getElementsByTagName('iframe')[0].contentWindow; var nodeBody = contentWindow.document.getElementsByTagName('body')[0]; console.log(nodeBody); $(nodeBody).pastableContenteditable();