Ticket #1376: 1376_2.patch
File 1376_2.patch, 6.4 KB (added by , 13 years ago) |
---|
-
_source/plugins/justify/plugin.js
50 50 function onSelectionChange( evt ) 51 51 { 52 52 var command = evt.editor.getCommand( this.name ); 53 command.state = getState.call( this, evt.editor, evt.data.path ); 54 command.fire( 'state' ); 53 command.setState( getState.call( this, evt.editor, evt.data.path ) ); 55 54 } 56 55 57 56 function justifyCommand( editor, name, value ) -
_source/plugins/selection/plugin.js
72 72 73 73 var selectAllCmd = 74 74 { 75 modes : { wysiwyg : 1, source : 1 },75 modes : { wysiwyg : 1, source : 1, readonly : 1 }, 76 76 exec : function( editor ) 77 77 { 78 78 switch ( editor.mode ) -
_source/plugins/save/plugin.js
11 11 { 12 12 var saveCmd = 13 13 { 14 modes : { wysiwyg:1, source:1 },14 modes : { wysiwyg:1, source:1,readonly:1 }, 15 15 16 16 exec : function( editor ) 17 17 { -
_source/plugins/clipboard/plugin.js
63 63 this.type = type; 64 64 this.canUndo = this.type == 'cut'; // We can't undo copy to clipboard. 65 65 this.startDisabled = true; 66 this.modes = { 'wysiwyg':1 }; 67 type == 'copy' && ( this.modes.readonly = 1 ); 66 68 }; 67 69 68 70 cutCopyCmd.prototype = -
_source/plugins/showborders/plugin.js
57 57 CKEDITOR.plugins.add( 'showborders', 58 58 { 59 59 requires : [ 'wysiwygarea' ], 60 modes : { 'wysiwyg' : 1 },60 modes : { 'wysiwyg' : 1, showblocks : 1 }, 61 61 62 62 init : function( editor ) 63 63 { -
_source/plugins/readonly/plugin.js
1 /* 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 ( function() 7 { 8 function cancelKeyListener( evt ) 9 { 10 var keystroke = evt.data.keyCode; 11 if ( keystroke != 9 && keystroke != CKEDITOR.SHIFT + 9 ) 12 evt.cancel(); 13 } 14 15 CKEDITOR.plugins.add( 'readonly', 16 { 17 requires : [ 'editingblock' ], 18 init : function( editor ) 19 { 20 var lastMode; 21 editor.on( 'editingBlockReady', function () 22 { 23 editor._.modes[ 'readonly' ] = editor._.modes[ 'wysiwyg' ]; 24 }); 25 26 editor.addCommand( 'readonly', 27 { 28 modes : { wysiwyg : 1, source : 1, readonly : 1 }, 29 editorFocus : false, 30 canUndo : false, 31 exec : function ( editor ) 32 { 33 var readOnly = this.state == CKEDITOR.TRISTATE_OFF; 34 readOnly && ( lastMode = editor.mode ); 35 editor.mode = readOnly ? 'readonly' : lastMode; 36 editor.fire( 'mode' ); 37 // Prevent key handling. 38 editor[ readOnly ? 'on' : 'removeListener' ]( 'key', cancelKeyListener, null, null, 0 ); 39 editor.forceNextSelectionCheck(); 40 editor.selectionChange(); 41 this.toggleState(); 42 } 43 }); 44 45 editor.ui.addButton( 'ReadOnly', 46 { 47 label : editor.lang.readOnly, 48 command : 'readonly' 49 }); 50 } 51 }); 52 53 } )(); -
_source/plugins/print/plugin.js
37 37 editor.document.$.execCommand( "Print" ); 38 38 }, 39 39 canUndo : false, 40 modes : { wysiwyg : !( CKEDITOR.env.opera ) } // It is imposible to print the inner document in Opera.40 modes : { wysiwyg : !( CKEDITOR.env.opera ), readonly:1 } // It is imposible to print the inner document in Opera. 41 41 }; -
_source/plugins/maximize/plugin.js
154 154 155 155 editor.addCommand( 'maximize', 156 156 { 157 modes : { wysiwyg : 1, source : 1 },157 modes : { wysiwyg : 1, source : 1, readonly : 1 }, 158 158 editorFocus : false, 159 159 exec : function() 160 160 { -
_source/plugins/preview/plugin.js
11 11 { 12 12 var previewCmd = 13 13 { 14 modes : { wysiwyg:1, source:1 },14 modes : { wysiwyg:1, source:1, readonly:1 }, 15 15 canUndo : false, 16 16 exec : function( editor ) 17 17 { -
_source/plugins/blockquote/plugin.js
9 9 10 10 (function() 11 11 { 12 function getState( editor,path )12 function getState( path ) 13 13 { 14 14 var firstBlock = path.block || path.blockLimit; 15 15 … … 27 27 { 28 28 var editor = evt.editor, 29 29 command = editor.getCommand( 'blockquote' ); 30 command.state = getState( editor, evt.data.path ); 31 command.fire( 'state' ); 30 command.setState( getState( evt.data.path ) ); 32 31 } 33 32 34 33 function noBlockLeft( bqBlock ) -
_source/plugins/about/plugin.js
9 9 init : function( editor ) 10 10 { 11 11 var command = editor.addCommand( 'about', new CKEDITOR.dialogCommand( 'about' ) ); 12 command.modes = { wysiwyg:1, source:1 };12 command.modes = { wysiwyg:1, source:1, readonly:1 }; 13 13 command.canUndo = false; 14 14 15 15 editor.ui.addButton( 'About',