Index: lams_central/web/ckeditor/plugins/paint/content.jsp =================================================================== diff -u -r656d1f554ccd1f49df2c4831639c7584d8f49bdb -rbcaeb1544f11878cf7fb75e77495ed77d2b059a5 --- lams_central/web/ckeditor/plugins/paint/content.jsp (.../content.jsp) (revision 656d1f554ccd1f49df2c4831639c7584d8f49bdb) +++ lams_central/web/ckeditor/plugins/paint/content.jsp (.../content.jsp) (revision bcaeb1544f11878cf7fb75e77495ed77d2b059a5) @@ -42,8 +42,8 @@ okButton.on('click', triggerOK); var xmlDic=""; - for(var prop in editor.lang.Paint.Flash){ - xmlDic += "" + editor.lang.Paint.Flash[prop] + ""; + for(var prop in CK.lang.Paint.Flash){ + xmlDic += "" + CK.lang.Paint.Flash[prop] + ""; } xmlDic += ""; var flashvars = { Index: lams_central/web/ckeditor/plugins/paint/plugin.js =================================================================== diff -u -r656d1f554ccd1f49df2c4831639c7584d8f49bdb -rbcaeb1544f11878cf7fb75e77495ed77d2b059a5 --- lams_central/web/ckeditor/plugins/paint/plugin.js (.../plugin.js) (revision 656d1f554ccd1f49df2c4831639c7584d8f49bdb) +++ lams_central/web/ckeditor/plugins/paint/plugin.js (.../plugin.js) (revision bcaeb1544f11878cf7fb75e77495ed77d2b059a5) @@ -16,8 +16,20 @@ ); editor.addCommand('Paint canvas', {exec:showDialogPlugin}); - editor.on('dblclick',onImageDoubleClick); + editor.paintStartingImage = ""; + + editor.on( 'doubleclick', function( evt ) { + var element = evt.data.element; + if ( element.is('img') && element.getAttribute('class') == "ckeditor_paint" ){ + evt.stop(); + evt.editor.paintStartingImage = element.getAttribute('src'); + evt.editor.execCommand('Paint canvas'); + } + }, null, null, 1); + + + CKEDITOR.dialog.addIframe( editor.lang.Paint.DialogName, editor.lang.Paint.DialogTitle, @@ -32,12 +44,5 @@ ); function showDialogPlugin(e){ - e.openDialog(editor.lang.Paint.DialogName); -} - -function onImageDoubleClick (ev){ - if(ev.scopeObj.getAttribute('class') == "ckeditor_paint"){ - ev.scopeObj.paintStartingImage = ev.scopeObj.src; - ev.scopeObj.execCommand('Paint canvas'); - } + e.openDialog(e.lang.Paint.DialogName); } \ No newline at end of file