The forum operates in read-only mode. Please head to StackOverflow for support.
(function() { CKEDITOR.plugins.add( 'wl_source', { init : function( editor ) { editor.addCommand( 'wlsource', { exec : function( editor ) { // do transformations here. editor.execCommand('source'); }, modes : { wysiwyg:1, source:1 }, canUndo : false // No support for undo/redo }); editor.ui.addButton( 'wl_source', { label : 'Source', icon : this.path + 'source.png', command : 'wlsource' } ); }, }); })();
Re: help! how to do something before an action...
(function() { CKEDITOR.plugins.add( 'wl_source', { init : function( editor ) { editor.addCommand( 'wlsource', { exec : function( editor ) { // do transformations here. editor.execCommand('source'); }, modes : { wysiwyg:1, source:1 }, canUndo : false // No support for undo/redo }); editor.ui.addButton( 'wl_source', { label : 'Source', icon : this.path + 'source.png', command : 'wlsource' } ); }, }); })();