From 2bfd716a52b02cffa159523c2911fbbf519772c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Pin?= Date: Wed, 7 Sep 2011 22:51:59 +0200 Subject: [PATCH 1/1] =?utf8?q?Bugfix=20:=20prendre=20le=20innerHTML=20du?= =?utf8?q?=20body=20du=20document=20n'est=20pas=20une=20bonne=20id=C3=A9e,?= =?utf8?q?=20dans=20la=20mesure=20o=C3=B9=20ckeditor=20ajoute=20des=20attr?= =?utf8?q?ibuts=20exotiques.=20Il=20vaut=20mieux=20utiliser=20dataValue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/ckeditor/plugins/plinn_image/plugin.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/skins/ckeditor/plugins/plinn_image/plugin.js b/skins/ckeditor/plugins/plinn_image/plugin.js index 022af4c..ffb96fe 100644 --- a/skins/ckeditor/plugins/plinn_image/plugin.js +++ b/skins/ckeditor/plugins/plinn_image/plugin.js @@ -49,11 +49,12 @@ CKEDITOR.plugins.add( 'plinn_image', editor.on('instanceReady', function(){ editor.on('getData', function(evt) { - var body = evt.editor.document.$.body; - var images = body.getElementsByTagName('IMG'); + var tmpDiv = document.createElement('div'); + tmpDiv.innerHTML = evt.data.dataValue; + var images = tmpDiv.getElementsByTagName('IMG'); for (var i = 0 ; i < images.length ; i++) updateImageSizeUrlParameters(images[i]); - evt.data.dataValue = evt.editor.document.$.body.innerHTML; + evt.data.dataValue = tmpDiv.innerHTML; } ); }); -- 2.20.1