From: <mlu...@us...> - 2011-09-14 20:12:44
|
Revision: 37262 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=37262&view=rev Author: mlustenberg Date: 2011-09-14 20:12:35 +0000 (Wed, 14 Sep 2011) Log Message: ----------- [FIX/ENH] wysiwyg_htmltowikii: fixed copy paste operations and added the corresponding tools to the toolbar. Modified Paths: -------------- trunk/lib/ckeditor_tiki/plugins/tikiwiki/plugin.js trunk/lib/toolbars/toolbarslib.php Modified: trunk/lib/ckeditor_tiki/plugins/tikiwiki/plugin.js =================================================================== --- trunk/lib/ckeditor_tiki/plugins/tikiwiki/plugin.js 2011-09-14 19:40:31 UTC (rev 37261) +++ trunk/lib/ckeditor_tiki/plugins/tikiwiki/plugin.js 2011-09-14 20:12:35 UTC (rev 37262) @@ -25,6 +25,9 @@ oldToDataFormat = editor.dataProcessor.toDataFormat ; editor.dataProcessor.toDataFormat = function ( html, fixForBody ) { return twplugin.toWikiFormat( editor, oldToDataFormat( html, fixForBody ) ); }; editor.dataProcessor.toHtml = function ( data, fixForBody ) { return twplugin.toHtmlFormat( editor, data ); }; + + // data in the clipboard is html, the input format is expected to be wiki + editor.on('paste', function(evt) {evt.editor.insertHtml(twplugin.toWikiFormat( editor, evt.data.html )); evt.stop(); }, editor.element.$); // button stuff goes here? }, Modified: trunk/lib/toolbars/toolbarslib.php =================================================================== --- trunk/lib/toolbars/toolbarslib.php 2011-09-14 19:40:31 UTC (rev 37261) +++ trunk/lib/toolbars/toolbarslib.php 2011-09-14 20:12:35 UTC (rev 37262) @@ -550,8 +550,11 @@ { switch ($this->wysiwyg) { case 'autosave': + case 'Copy': + case 'Cut': case 'Format': case 'JustifyLeft': + case 'Paste': case 'Redo': case 'RemoveFormat': case 'ShowBlocks': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |