Ticket #3496: 3496_3.patch
File 3496_3.patch, 46.8 KB (added by , 16 years ago) |
---|
-
_source/core/command.js
29 29 30 30 CKEDITOR.command.prototype = 31 31 { 32 enable : function() 33 { 34 if ( this.state == CKEDITOR.TRISTATE_DISABLED ) 35 this.setState( ( !this.preserveState || ( typeof this.previousState == 'undefined' ) ) ? CKEDITOR.TRISTATE_OFF : this.previousState ); 36 }, 37 38 disable : function() 39 { 40 this.setState( CKEDITOR.TRISTATE_DISABLED ); 41 }, 42 32 43 setState : function( newState ) 33 44 { 34 45 // Do nothing if there is no state change. 35 46 if ( this.state == newState ) 36 47 return false; 37 48 49 this.previousState = this.state; 50 38 51 // Set the new state. 39 52 this.state = newState; 40 53 -
_source/core/config.js
150 150 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 151 151 */ 152 152 153 plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,save,s miley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',153 plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', 154 154 155 155 /** 156 156 * List of additional plugins to be loaded. This is a tool setting which -
_source/core/editor.js
320 320 for ( var name in commands ) 321 321 { 322 322 command = commands[ name ]; 323 324 command.setState( command.modes[ mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); 323 command[ command.modes[ mode ] ? 'enable' : 'disable' ](); 325 324 } 326 325 } 327 326 … … 399 398 400 399 CKEDITOR.fire( 'instanceCreated', null, this ); 401 400 402 this.on( 'mode', updateCommandsMode );401 this.on( 'mode', updateCommandsMode, null, null, 1 ); 403 402 404 403 initConfig( this, instanceConfig ); 405 404 }; -
_source/lang/en.js
620 620 'FFF' : 'White' 621 621 }, 622 622 623 scayt : 624 { 625 title : 'Spell Check As You Type', 626 enable : 'Enable SCAYT', 627 disable : 'Disable SCAYT', 628 about : 'About SCAYT', 629 toggle : 'Toggle SCAYT', 630 options : 'Options', 631 langs : 'Languages', 632 moreSuggestions : 'More suggestions', 633 ignore : 'Ignore', 634 ignoreAll : 'Ignore All', 635 addWord : 'Add Word', 636 emptyDic : 'Dictionary name should not be empty.', 637 optionsTab : 'Options', 638 languagesTab : 'Languages', 639 dictionariesTab : 'Dictionaries', 640 aboutTab : 'About' 641 }, 642 623 643 about : 624 644 { 625 645 title : 'About CKEditor', -
_source/plugins/button/plugin.js
27 27 */ 28 28 CKEDITOR.ui.button = function( definition ) 29 29 { 30 /** 31 * The button label. 32 * @name CKEDITOR.ui.button.prototype.label 33 * @type String 34 * @example 35 */ 36 this.label = definition.label; 37 38 /** 39 * The button advisory title. It is usually displayed as the button tooltip. 40 * If not defined, the label is used. 41 * @name CKEDITOR.ui.button.prototype.title 42 * @type String 43 * @example 44 */ 45 this.title = definition.title || definition.label; 46 47 /** 48 * The command name associated to the button. If no command is defined, the 49 * "click" event is used. 50 * @name CKEDITOR.ui.button.prototype.command 51 * @type String 52 * @example 53 */ 54 this.command = definition.command; 55 56 this.className = definition.className || ( definition.command && 'cke_button_' + definition.command ) || ''; 57 58 this.icon = definition.icon; 59 this.iconOffset = definition.iconOffset; 60 61 /** 62 * The function to be called when the user clicks the button. If not 63 * defined, the "command" property is required, and the command gets 64 * executed on click. 65 * @function 66 * @name CKEDITOR.ui.button.prototype.click 67 * @example 68 */ 69 this.click = definition.click || function( editor ) 30 // Copy all definition properties to this object. 31 CKEDITOR.tools.extend( this, definition, 32 // Set defaults. 70 33 { 71 editor.execCommand( definition.command ); 72 }; 34 title : definition.label, 35 className : definition.className || ( definition.command && 'cke_button_' + definition.command ) || '', 36 click : definition.click || function( editor ) 37 { 38 editor.execCommand( definition.command ); 39 } 40 }); 73 41 74 42 this._ = {}; 75 43 }; … … 118 86 this.button.click( editor ); 119 87 } 120 88 }; 89 90 var clickFn = CKEDITOR.tools.addFunction( instance.execute, instance ); 121 91 122 92 var index = CKEDITOR.ui.button._.instances.push( instance ) - 1; 123 93 … … 138 108 this.setState( command.state ); 139 109 }, this); 140 110 141 classes += ' 111 classes += 'cke_' + ( 142 112 command.state == CKEDITOR.TRISTATE_ON ? 'on' : 143 113 command.state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' : 144 114 'off' ); 145 115 } 146 116 } 117 118 if ( !command ) 119 classes += 'cke_off'; 147 120 148 121 if ( this.className ) 149 122 classes += ' ' + this.className; … … 176 149 output.push( 177 150 ' onkeydown="return CKEDITOR.ui.button._.keydown(', index, ', event);"' + 178 151 ' onfocus="return CKEDITOR.ui.button._.focus(', index, ', event);"' + 179 ' onclick=" return CKEDITOR.ui.button._.click(', index, ', event);">' +152 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' + 180 153 '<span class="cke_icon"' ); 181 154 182 155 if ( this.icon ) … … 187 160 188 161 output.push( 189 162 '></span>' + 190 '<span class="cke_label">', this.label, '</span>' + 163 '<span class="cke_label">', this.label, '</span>' ); 164 165 if ( this.hasArrow ) 166 { 167 output.push( 168 '<span class="cke_buttonarrow"></span>' ); 169 } 170 171 output.push( 191 172 '</a>', 192 173 '</span>' ); 193 174 175 if ( this.onRender ) 176 this.onRender(); 177 194 178 return instance; 195 179 }, 196 180 … … 213 197 { 214 198 instances : [], 215 199 216 click : function( index )217 {218 CKEDITOR.ui.button._.instances[ index ].execute();219 return false;220 },221 222 200 keydown : function( index, ev ) 223 201 { 224 202 var instance = CKEDITOR.ui.button._.instances[ index ]; -
_source/plugins/contextmenu/plugin.js
39 39 40 40 _ : 41 41 { 42 onMenu : function( offsetParent, offsetX, offsetY )42 onMenu : function( offsetParent, corner, offsetX, offsetY ) 43 43 { 44 44 var menu = this._.menu, 45 45 editor = this.editor; … … 54 54 menu = this._.menu = new CKEDITOR.menu( editor ); 55 55 menu.onClick = CKEDITOR.tools.bind( function( item ) 56 56 { 57 menu.onHide = null;58 59 57 var noUnlock = true; 60 58 menu.hide(); 61 59 … … 88 86 // Lock the selection in IE, so it can be restored when closing the 89 87 // menu. 90 88 if ( CKEDITOR.env.ie ) 91 {92 89 selection.lock(); 93 menu.onHide = function() 90 91 menu.onHide = CKEDITOR.tools.bind( function() 94 92 { 95 editor.getSelection().unlock(); 96 }; 97 } 93 menu.onHide = null; 98 94 95 if ( CKEDITOR.env.ie ) 96 editor.getSelection().unlock(); 97 98 this.onHide && this.onHide(); 99 }, 100 this ); 101 99 102 // Call all listeners, filling the list of items to be displayed. 100 103 for ( var i = 0 ; i < listeners.length ; i++ ) 101 104 { … … 116 119 } 117 120 } 118 121 119 menu.show( offsetParent, editor.lang.dir == 'rtl' ? 2 : 1, offsetX, offsetY );122 menu.show( offsetParent, corner || ( editor.lang.dir == 'rtl' ? 2 : 1 ), offsetX, offsetY ); 120 123 } 121 124 }, 122 125 … … 137 140 138 141 CKEDITOR.tools.setTimeout( function() 139 142 { 140 this._.onMenu( offsetParent, offsetX, offsetY );143 this._.onMenu( offsetParent, null, offsetX, offsetY ); 141 144 }, 142 145 0, this ); 143 146 }, … … 149 152 this._.listeners.push( listenerFn ); 150 153 }, 151 154 152 show : function( )155 show : function( offsetParent, corner, offsetX, offsetY ) 153 156 { 154 157 this.editor.focus(); 155 this._.onMenu( CKEDITOR.document.getDocumentElement(), 0,0 );158 this._.onMenu( offsetParent || CKEDITOR.document.getDocumentElement(), corner, offsetX || 0, offsetY || 0 ); 156 159 } 157 160 } 158 161 }); -
_source/plugins/menu/plugin.js
20 20 21 21 CKEDITOR.tools.extend( CKEDITOR.editor.prototype, 22 22 { 23 addMenuGroup : function( name, order ) 24 { 25 this._.menuGroups[ name ] = order || 100; 26 }, 27 23 28 addMenuItem : function( name, definition ) 24 29 { 25 30 if ( this._.menuGroups[ definition.group ] ) … … 171 176 { 172 177 var item = this.items[ index ]; 173 178 179 if ( item.state == CKEDITOR.TRISTATE_DISABLED ) 180 { 181 this.hide(); 182 return; 183 } 184 174 185 if ( item.getItems ) 175 186 this._.showSubMenu( index ); 176 187 else … … 258 269 render : function( menu, index, output ) 259 270 { 260 271 var id = menu.id + String( index ), 261 state = this.state || CKEDITOR.TRISTATE_OFF;272 state = ( typeof this.state == 'undefined' ) ? CKEDITOR.TRISTATE_OFF : this.state; 262 273 263 274 var classes = ' cke_' + ( 264 275 state == CKEDITOR.TRISTATE_ON ? 'on' : -
_source/plugins/menubutton/plugin.js
Property changes on: _source\plugins\menubutton ___________________________________________________________________ Added: bugtraq:label + Ticket Added: bugtraq:url + http://dev.fckeditor.net/ticket/%BUGID% Added: webviewer:pathrevision + http://dev.fckeditor.net/browser/%PATH%?rev=%REVISION% Added: webviewer:revision + http://dev.fckeditor.net/changeset/%REVISION% Added: bugtraq:logregex + (?:ticket: *|#)(\d+) *(?:, *(\d+))*
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 CKEDITOR.plugins.add( 'menubutton', 7 { 8 requires : [ 'button' ], 9 beforeInit : function( editor ) 10 { 11 editor.ui.addHandler( CKEDITOR.UI_MENUBUTTON, CKEDITOR.ui.menuButton.handler ); 12 } 13 }); 14 15 /** 16 * Button UI element. 17 * @constant 18 * @example 19 */ 20 CKEDITOR.UI_MENUBUTTON = 5; 21 22 (function() 23 { 24 var clickFn = function( editor ) 25 { 26 var _ = this._; 27 28 // Do nothing if this button is disabled. 29 if ( _.state === CKEDITOR.TRISTATE_DISABLED ) 30 return; 31 32 _.previousState = _.state; 33 34 // Check if we already have a menu for it, otherwise just create it. 35 var menu = _.menu; 36 if ( !menu ) 37 { 38 menu = _.menu = new CKEDITOR.plugins.contextMenu( editor ); 39 40 menu.onHide = CKEDITOR.tools.bind( function() 41 { 42 this.setState( _.previousState ); 43 }, 44 this ); 45 46 // Initialize the menu items at this point. 47 if ( this.onMenu ) 48 { 49 menu.addListener( this.onMenu ); 50 } 51 } 52 53 if ( _.on ) 54 { 55 menu.hide(); 56 return; 57 } 58 59 this.setState( CKEDITOR.TRISTATE_ON ); 60 61 menu.show( CKEDITOR.document.getById( this._.id ), 4 ); 62 }; 63 64 65 CKEDITOR.ui.menuButton = CKEDITOR.tools.createClass( 66 { 67 base : CKEDITOR.ui.button, 68 69 $ : function( definition ) 70 { 71 // We don't want the panel definition in this object. 72 var panelDefinition = definition.panel; 73 delete definition.panel; 74 75 this.base( definition ); 76 77 this.hasArrow = true; 78 79 this.click = clickFn; 80 }, 81 82 statics : 83 { 84 handler : 85 { 86 create : function( definition ) 87 { 88 return new CKEDITOR.ui.menuButton( definition ); 89 } 90 } 91 } 92 }); 93 })(); 94 No newline at end of file -
_source/plugins/panelbutton/plugin.js
19 19 */ 20 20 CKEDITOR.UI_PANELBUTTON = 4; 21 21 22 CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass( 22 (function() 23 23 { 24 $ : function( definition)24 var clickFn = function( editor ) 25 25 { 26 // Copy all definition properties to this object. 27 CKEDITOR.tools.extend( this, definition, 28 // Set defaults. 29 { 30 title : definition.label, 31 modes : { wysiwyg : 1 } 32 }); 26 var _ = this._; 33 27 34 // We don't want the panel definition in this object. 35 var panelDefinition = this.panel; 36 delete this.panel; 28 if ( _.state == CKEDITOR.TRISTATE_DISABLED ) 29 return; 37 30 38 this.document = ( panelDefinition 39 && panelDefinition.parent 40 && panelDefinition.parent.getDocument() ) 41 || CKEDITOR.document; 42 this._ = 43 { 44 panelDefinition : panelDefinition 45 }; 46 }, 31 this.createPanel( editor ); 47 32 48 statics : 49 { 50 handler : 33 if ( _.on ) 51 34 { 52 create : function( definition ) 53 { 54 return new CKEDITOR.ui.panelButton( definition ); 55 } 35 _.panel.hide(); 36 return; 56 37 } 57 },58 38 59 proto : 60 { 61 render : function( editor, output ) 62 { 63 var id = this._.id = 'cke_' + CKEDITOR.tools.getNextNumber(); 39 _.panel.showBlock( this._.id, this.document.getById( this._.id ), 4 ); 40 }; 64 41 65 var instance =66 {67 id : id,68 focus : function()69 {70 var element = CKEDITOR.document.getById( id );71 element.focus();72 },73 execute : function()74 {75 this.button.click( editor );76 }77 };78 42 79 var clickFn = CKEDITOR.tools.addFunction( function( $element )80 81 var _ = this._;43 CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass( 44 { 45 base : CKEDITOR.ui.button, 82 46 83 if ( _.state == CKEDITOR.TRISTATE_DISABLED ) 84 return; 47 $ : function( definition ) 48 { 49 // We don't want the panel definition in this object. 50 var panelDefinition = definition.panel; 51 delete definition.panel; 85 52 86 this.createPanel( editor);53 this.base( definition ); 87 54 88 if ( _.on ) 89 { 90 _.panel.hide(); 91 return; 92 } 55 this.document = ( panelDefinition 56 && panelDefinition.parent 57 && panelDefinition.parent.getDocument() ) 58 || CKEDITOR.document; 59 60 this.hasArrow = true; 93 61 94 _.panel.showBlock( this._.id, new CKEDITOR.dom.element( $element ), 4 ); 95 }, 96 this ); 97 var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ){ 62 this.click = clickFn; 98 63 99 ev = new CKEDITOR.dom.event( ev ); 64 this._ = 65 { 66 panelDefinition : panelDefinition 67 }; 68 }, 100 69 101 var keystroke = ev.getKeystroke(); 102 switch ( keystroke ) 70 statics : 71 { 72 handler : 73 { 74 create : function( definition ) 103 75 { 104 case 13 : // ENTER 105 case 32 : // SPACE 106 case 40 : // ARROW-DOWN 107 // Show panel 108 CKEDITOR.tools.callFunction( clickFn, element ); 109 break; 110 default : 111 // Delegate the default behavior to toolbar button key handling. 112 instance.onkey( instance, keystroke ); 76 return new CKEDITOR.ui.panelButton( definition ); 113 77 } 114 115 // Avoid subsequent focus grab on editor document.116 ev.preventDefault();117 });118 119 var label = this.label || '';120 121 var classes = 'cke_off';122 123 if ( this.className )124 classes += ' ' + this.className;125 126 editor.on( 'mode', function()127 {128 this.setState( this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );129 },130 this );131 132 output.push(133 '<span class="cke_button">',134 '<a id="', id, '"' +135 ' class="', classes, '" href="javascript:void(\'', ( this.title || '' ).replace( "'", '' ), '\')"' +136 ' title="', this.title, '"' +137 ' tabindex="-1"' +138 ' hidefocus="true"' );139 140 // Some browsers don't cancel key events in the keydown but in the141 // keypress.142 // TODO: Check if really needed for Gecko+Mac.143 if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) )144 {145 output.push(146 ' onkeypress="return false;"' );147 78 } 148 149 // With Firefox, we need to force the button to redraw, otherwise it150 // will remain in the focus state.151 if ( CKEDITOR.env.gecko )152 {153 output.push(154 ' onblur="this.style.cssText = this.style.cssText;"' );155 }156 157 output.push(158 ' onkeydown="CKEDITOR.tools.callFunction( ', keyDownFn, ', event, this );"' +159 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +160 '<span class="cke_icon"></span>' +161 '<span class="cke_label">', this.label, '</span>' +162 '<span class="cke_buttonarrow"></span>' +163 '</a>' +164 '</span>' );165 166 return instance;167 79 }, 168 80 169 createPanel : function( editor )81 proto : 170 82 { 171 var _ = this._; 83 createPanel : function( editor ) 84 { 85 var _ = this._; 172 86 173 if ( _.panel )174 return;87 if ( _.panel ) 88 return; 175 89 176 var panelDefinition = this._.panelDefinition || {},177 panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(),178 panel = this._.panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ),179 me = this;90 var panelDefinition = this._.panelDefinition || {}, 91 panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(), 92 panel = this._.panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ), 93 me = this; 180 94 181 panel.onShow = function()182 {183 if ( me.className )184 this.element.getFirst().addClass( me.className + '_panel' );95 panel.onShow = function() 96 { 97 if ( me.className ) 98 this.element.getFirst().addClass( me.className + '_panel' ); 185 99 186 me.setState( CKEDITOR.TRISTATE_ON ); 100 _.oldState = me._.state; 101 me.setState( CKEDITOR.TRISTATE_ON ); 187 102 188 _.on = 1;103 _.on = 1; 189 104 190 if ( me.onOpen )191 me.onOpen();192 };105 if ( me.onOpen ) 106 me.onOpen(); 107 }; 193 108 194 panel.onHide = function()195 {196 if ( me.className )197 this.element.getFirst().removeClass( me.className + '_panel' );109 panel.onHide = function() 110 { 111 if ( me.className ) 112 this.element.getFirst().removeClass( me.className + '_panel' ); 198 113 199 me.setState( CKEDITOR.TRISTATE_OFF);114 me.setState( _.oldState ); 200 115 201 _.on = 0;116 _.on = 0; 202 117 203 if ( me.onClose )204 me.onClose();205 };118 if ( me.onClose ) 119 me.onClose(); 120 }; 206 121 207 panel.onEscape = function()208 {209 panel.hide();210 me.document.getById( _.id ).focus();211 };122 panel.onEscape = function() 123 { 124 panel.hide(); 125 me.document.getById( _.id ).focus(); 126 }; 212 127 213 128 214 if ( this.onBlock ) 215 this.onBlock( panel, _.id ); 216 }, 129 if ( this.onBlock ) 130 this.onBlock( panel, _.id ); 131 } 132 } 133 }); 217 134 218 setState : CKEDITOR.ui.button.prototype.setState 219 } 220 }); 135 })(); 136 No newline at end of file -
_source/plugins/scayt/dialogs/options.js
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 CKEDITOR.dialog.add( 'scaytcheck', function( editor ) 7 { 8 var firstLoad = true, 9 captions, 10 doc = CKEDITOR.document, 11 fckLang = "en"; 12 13 var init_with_captions = function() 14 { 15 var dialog = this, 16 lang_list = dialog.data.scayt.getLangList(), 17 buttons = [ 'dic_create','dic_delete','dic_rename','dic_restore' ], 18 labels = [ 'mixedCase','mixedWithDigits','allCaps','ignoreDomainNames' ]; 19 20 /* 21 // Add buttons titles 22 for ( var i in buttons ) 23 { 24 var button = buttons[ i ]; 25 doc.getById( button ).setHtml( captions[ "button_" + button] ); 26 } 27 doc.getById( "dic_info" ).setHtml( captions[ "dic_info" ] ); 28 */ 29 30 // Fill options and dictionary labels. 31 for ( var i in labels ) 32 { 33 var label = "label_" + labels[ i ]; 34 var labelElement = doc.getById( label ); 35 if ( labelElement ) 36 labelElement.setHtml( captions[ label ] ); 37 } 38 39 var about = '<p>' + captions[ "about_throwt_image" ] + '</p>'+ 40 '<p>' + captions[ "version" ] + dialog.data.scayt.version.toString() + '</p>' + 41 '<p>' + captions[ "about_throwt_copy" ] + '</p>'; 42 43 doc.getById( "scayt_about" ).setHtml( about ); 44 45 // Create languages tab. 46 var createOption = function( option, list ) 47 { 48 var label = doc.createElement( 'label' ); 49 label.setAttribute( 'for', 'cke_option' + option ); 50 label.setHtml( list[ option ] ); 51 52 if ( dialog.sLang == option ) // Current. 53 dialog.chosed_lang = option; 54 55 var div = doc.createElement( 'div' ); 56 radio = CKEDITOR.dom.element.createFromHtml( '<input id="cke_option' + 57 option + '" type="radio" ' + 58 ( dialog.sLang == option ? 'checked="checked"' : '' ) + 59 ' value="' + option + '" name="scayt_lang" />' ); 60 61 radio.on( 'click', function() 62 { 63 this.$.checked = true; 64 dialog.chosed_lang = option; 65 }); 66 67 div.append( radio ); 68 div.append( label ); 69 70 return { 71 lang : list[ option ], 72 code : option, 73 radio : div 74 } 75 }; 76 77 var langList = []; 78 for ( var i in lang_list.rtl ) 79 langList[ langList.length ] = createOption( i, lang_list.ltr ) 80 81 for ( var i in lang_list.ltr ) 82 langList[ langList.length ] = createOption( i, lang_list.ltr ) 83 84 langList.sort( function( lang1, lang2 ) 85 { 86 return ( lang2.lang > lang1.lang ) ? -1 : 1 ; 87 }); 88 89 var fieldL = doc.getById( 'scayt_lcol' ), 90 fieldR = doc.getById( 'scayt_rcol' ); 91 for ( var i=0; i < langList.length; i++ ) 92 { 93 var field = ( i < langList.length / 2 ) ? fieldL : fieldR; 94 field.append( langList[ i ].radio ); 95 } 96 }; 97 var reload = function() 98 { 99 var dialog = this; 100 101 // Animate options. 102 for ( var i in dialog.options ) 103 { 104 var checkbox = doc.getById( i ); 105 if ( checkbox ) 106 { 107 checkbox.removeAttribute( 'checked' ); 108 if ( dialog.options[ i ] == 1 ) 109 checkbox.setAttribute( 'checked', "checked" ); 110 111 // Bind events. Do it only once. 112 if ( firstLoad ) 113 { 114 checkbox.on( 'click', function() 115 { 116 dialog.options[ this.getId() ] = this.$.checked ? 1 : 0 ; 117 } ) 118 } 119 } 120 } 121 122 // * user dictionary 123 var dic_buttons = [ 124 // [0] contains buttons for creating 125 "dic_create,dic_restore", 126 // [1] contains buton for manipulation 127 "dic_rename,dic_delete,dic_restore" 128 ]; 129 scayt.getNameUserDictionary( 130 function( o ) 131 { 132 var dic_name = o.dname; 133 if ( dic_name ) 134 { 135 dojo.byId( 'dic_name' ).value = dic_name; 136 display_dic_buttons( dic_buttons[1] ); 137 } 138 else 139 display_dic_buttons( dic_buttons[0] ); 140 141 }, 142 function () { 143 }); 144 145 var dic_flag = 0; 146 // ** bind event listeners 147 dojo.query("div.dic_buttons a.button").onclick(function( ev ) 148 { 149 if (typeof window[this.id] == 'function' ){ 150 // get dic name 151 var dic_name = dojo.trim ( dojo.byId('dic_name').value ); 152 // check common dictionary rules 153 if (!dic_name) 154 { 155 dic_error_message( editor.lang.scayt.emptyDic ); 156 return false; 157 } 158 //apply handler 159 window[this.id].apply( window, [this,ev , dic_name, dic_buttons ] ); 160 } 161 //console.info( typeof window[this.id], window[this.id].calle ) 162 return false; 163 }); 164 }; 165 166 return { 167 title : editor.lang.scayt.title, 168 minWidth : 340, 169 minHeight : 200, 170 onShow : function() 171 { 172 var dialog = this; 173 dialog.data = editor.fire( "scaytDialog", {} ); 174 dialog.options = dialog.data.scayt_control.option(); 175 dialog.sLang = dialog.data.scayt_control.sLang; 176 177 if ( !dialog.data || !dialog.data.scayt || !dialog.data.scayt_control ) 178 { 179 alert( "Error loading application service" ); 180 dialog.hide(); 181 return; 182 } 183 184 var stop = 0; 185 if ( firstLoad ) 186 { 187 dialog.data.scayt.getCaption( 'en', function( caps ) 188 { 189 if ( stop++ > 0 ) // Once only 190 return; 191 captions = caps; 192 init_with_captions.apply( dialog ); 193 reload.apply( dialog ); 194 firstLoad = false; 195 }); 196 } 197 else 198 reload.apply( dialog ); 199 200 dialog.selectPage( dialog.data.tab ); 201 }, 202 onOk : function() 203 { 204 var scayt_control = this.data.scayt_control; 205 o = scayt_control.option(); 206 c = 0; 207 208 // Set upp options if any was set. 209 for ( var oN in this.options ) 210 { 211 if (o[oN] != this.options[ oN ] && c == 0 ) 212 { 213 scayt_control.option( this.options ); 214 c++; 215 } 216 } 217 218 // Setup languge if it was changed. 219 var csLang = this.chosed_lang; 220 if ( csLang && this.data.sLang != csLang ) 221 { 222 scayt_control.setLang( csLang ); 223 c++; 224 } 225 if ( c > 0 ) 226 scayt_control.refresh(); 227 }, 228 contents : [ 229 { 230 id : 'options', 231 label : editor.lang.scayt.optionsTab, 232 elements : [ 233 { 234 type : 'html', 235 id : 'options', 236 html : '<div class="inner_options">' + 237 ' <div class="messagebox"></div>' + 238 ' <div>' + 239 ' <input type="checkbox" value="0" id="allCaps" />' + 240 ' <label for="allCaps" id="label_allCaps"></label>' + 241 ' </div>' + 242 ' <div>' + 243 ' <input type="checkbox" value="0" id="ignoreDomainNames" />' + 244 ' <label for="ignoreDomainNames" id="label_ignoreDomainNames"></label>' + 245 ' </div>' + 246 ' <div>' + 247 ' <input type="checkbox" value="0" id="mixedCase" />' + 248 ' <label for="mixedCase" id="label_mixedCase"></label>' + 249 ' </div>' + 250 ' <div>' + 251 ' <input type="checkbox" value="0" id="mixedWithDigits" />' + 252 ' <label for="mixedWithDigits" id="label_mixedWithDigits"></label>' + 253 ' </div>' + 254 '</div>' 255 } 256 ] 257 }, 258 { 259 id : 'langs', 260 label : editor.lang.scayt.languagesTab, 261 elements : [ 262 { 263 type : 'html', 264 id : 'langs', 265 html : '<div class="inner_langs">' + 266 ' <div class="messagebox"></div> ' + 267 ' <div style="float:left;width:47%;margin-left:5px;" id="scayt_lcol" ></div>' + 268 ' <div style="float:left;width:47%;margin-left:15px;" id="scayt_rcol"></div>' + 269 '</div>' 270 } 271 ] 272 }, 273 /* 274 { 275 id : 'dictionaries', 276 label : editor.lang.scayt.dictionariesTab, 277 elements : [ 278 { 279 type : 'html', 280 style: '', 281 id : 'dic', 282 html : '<div class="inner_dictionary">' + 283 ' <div class="messagebox" id="dic_message"></div>' + 284 ' <div class="dictionary" > ' + 285 ' <label for="dname" id="dname"></label>' + 286 ' <input type="text" size="14" maxlength="15" value="" id="dic_name" name="dic_name"/>' + 287 ' <div class="dic_buttons">' + 288 ' <a href="javascript:void(0)" id="dic_create" class="button"></a>' + 289 ' <a href="javascript:void(0)" id="dic_delete" class="button"></a>' + 290 ' <a href="javascript:void(0)" id="dic_rename" class="button"></a>' + 291 ' <a href="javascript:void(0)" id="dic_restore" class="button"></a>' + 292 ' </div>' + 293 ' </div><p id="dic_info"></p>' + 294 '</div>' 295 } 296 ] 297 }, 298 */ 299 { 300 id : 'about', 301 label : editor.lang.scayt.aboutTab, 302 elements : [ 303 { 304 type : 'html', 305 id : 'about', 306 style : "margin: 10px 40px;", 307 html : '<div id="scayt_about"></div>' 308 } 309 ] 310 } 311 ] 312 }; 313 }); -
_source/plugins/scayt/dialogs/toolbar.css
1 a 2 { 3 text-decoration:none; 4 padding: 2px 4px 4px 6px; 5 display : block; 6 border-width: 1px; 7 border-style: solid; 8 margin : 0px; 9 } 10 11 a.cke_scayt_toogle:hover, 12 a.cke_scayt_toogle:focus, 13 a.cke_scayt_toogle:active 14 { 15 border-color: #316ac5; 16 background-color: #dff1ff; 17 color : #000; 18 cursor: pointer; 19 margin : 0px; 20 } 21 a.cke_scayt_toogle { 22 color : #316ac5; 23 border-color: #fff; 24 } 25 .scayt_enabled a.cke_scayt_item { 26 color : #316ac5; 27 border-color: #fff; 28 margin : 0px; 29 } 30 .scayt_disabled a.cke_scayt_item { 31 color : gray; 32 border-color : #fff; 33 } 34 .scayt_enabled a.cke_scayt_item:hover, 35 .scayt_enabled a.cke_scayt_item:focus, 36 .scayt_enabled a.cke_scayt_item:active 37 { 38 border-color: #316ac5; 39 background-color: #dff1ff; 40 color : #000; 41 cursor: pointer; 42 } 43 .scayt_disabled a.cke_scayt_item:hover, 44 .scayt_disabled a.cke_scayt_item:focus, 45 .scayt_disabled a.cke_scayt_item:active 46 { 47 border-color: gray; 48 background-color: #dff1ff; 49 color : gray; 50 cursor: no-drop; 51 } 52 .cke_scayt_set_on, .cke_scayt_set_off 53 { 54 display: none; 55 } 56 .scayt_enabled .cke_scayt_set_on 57 { 58 display: none; 59 } 60 .scayt_disabled .cke_scayt_set_on 61 { 62 display: inline; 63 } 64 .scayt_disabled .cke_scayt_set_off 65 { 66 display: none; 67 } 68 .scayt_enabled .cke_scayt_set_off 69 { 70 display: inline; 71 } 72 No newline at end of file -
_source/plugins/scayt/plugin.js
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 /** 7 * @fileOverview Spell Check As You Type (SCAYT). 8 * Button name : Scayt. 9 */ 10 11 (function() 12 { 13 var commandName = "scaytcheck", 14 sc_on_cssclass = "scayt_enabled", 15 sc_off_cssclass = 'scayt_disabled', 16 openPage = ''; 17 18 var onEngineLoad = function() 19 { 20 var editor = this; 21 dojo.requireLocalization( 'scayt', 'caption', '', "ROOT" ); 22 23 var createInstnce = function() // Create new instance every time Document is created. 24 { 25 // Initialise Scayt instance. 26 var scayt_control = new scayt( 27 { 28 srcNodeRef: editor.document.getWindow().$.frameElement 29 }); 30 31 // Copy config. 32 var lastInstance = plugin.instances[ editor.name ] 33 if ( lastInstance ) 34 { 35 scayt_control.sLang = lastInstance.sLang; 36 scayt_control.option( lastInstance.option() ); 37 scayt_control.paused = lastInstance.paused; 38 } 39 40 plugin.instances[ editor.name ] = scayt_control; 41 42 try { 43 scayt_control.setDisabled( scayt_control.paused === false ); // I really don't know why it couse JS error in IE 44 } catch (e) {} 45 }; 46 47 editor.on( 'contentDom', createInstnce ) // Get the iframe somehow. 48 editor.on( 'contentDomUnload', function() 49 { 50 // Remove scripts. 51 var scripts = CKEDITOR.document.getElementsByTag( 'script' ); 52 scaytIdRegex = /^dojoIoScript(\d+)$/i; 53 scaytSrcRegex = /^http:\/\/demo\.spellchecker\.net\/spellcheck3\/script\/ssrv\.cgi/i; 54 55 for ( var i=0; i < scripts.count(); i++ ) 56 { 57 var script = scripts.getItem( i ), 58 id = script.getId(), 59 src = script.getAttribute( 'src' ); 60 61 if ( id && src && id.match( scaytIdRegex ) && src.match( scaytSrcRegex )) 62 script.remove(); 63 } 64 }) 65 66 editor.on( 'beforeCommandExec', function( ev ) // Disable SCAYT before Source command execution. 67 { 68 if ( ev.data.name == 'source' && editor.mode == 'wysiwyg' ) 69 { 70 var scayt = plugin.getScayt( editor ) 71 if ( scayt ) 72 { 73 scayt.paused = !scayt.disabled; 74 scayt.setDisabled( true ); 75 } 76 } 77 }); 78 79 // Listen to data manipulation to reflect scayt markup. 80 editor.on( 'beforeGetData', function() 81 { 82 if ( plugin.isScaytEnabled( editor ) ) 83 plugin.getScayt( editor ).refresh(); 84 }); 85 86 editor.on( 'afterSetData', function() 87 { 88 if ( plugin.isScaytEnabled( editor ) ) 89 plugin.getScayt( editor ).refresh(); 90 }); 91 92 editor.on( 'scaytDialog', function( ev ) // Communication with dialog. 93 { 94 ev.data.djConfig = djConfig; 95 ev.data.scayt_control = plugin.getScayt( editor ); 96 ev.data.tab = openPage; 97 ev.data.scayt = scayt; 98 }); 99 100 if ( editor.document ) 101 { 102 createInstnce(); 103 editor.fire( 'showScaytState' ); 104 } 105 }; 106 107 CKEDITOR.plugins.scayt = 108 { 109 engineLoaded : false, 110 instances : {}, 111 getScayt : function( editor ) 112 { 113 var instance = this.instances[ editor.name ]; 114 return instance; 115 }, 116 isScaytReady : function( editor ) 117 { 118 return this.engineLoaded === true && 119 'undefined' !== typeof scayt && this.getScayt( editor ); 120 }, 121 isScaytEnabled : function( editor ) 122 { 123 var scayt = this.getScayt( editor ); 124 return ( scayt ) ? scayt.disabled === false : false; 125 }, 126 loadEngine : function( editor ) 127 { 128 if ( this.engineLoaded === true ) 129 return onEngineLoad.apply( editor ); // Add new instance. 130 else if ( this.engineLoaded == -1 ) // We are waiting. 131 return CKEDITOR.on( "scaytReady", function(){ onEngineLoad.apply( editor )} ); // Use function(){} to avoid rejection as duplicate. 132 133 CKEDITOR.on( "scaytReady", onEngineLoad, editor ); 134 CKEDITOR.on( "scaytReady", function() 135 { 136 this.engineLoaded = true; 137 }, 138 this, 139 null, 140 0 ); // First to run. 141 142 this.engineLoaded = -1; // Loading in progress. 143 djConfig = 144 { 145 baseUrl: "./", 146 blankGif: "http://demo.spellchecker.net/spellcheck3/lf/scayt/blank.gif", 147 parseOnLoad: true, 148 afterOnLoad: true, 149 useXDomain: true, 150 locale: 'en', 151 xdWaitSeconds: 10, 152 preventCache: false, 153 scaytNodes: document.getElementById('foo'), 154 require: [ 155 "dojo.i18n", 156 "scayt._base" 157 ], 158 modulePaths: 159 { 160 "scayt": "http://demo.spellchecker.net/spellcheck3/lf/scayt" 161 }, 162 addOnLoad: 163 [ 164 function() 165 { 166 CKEDITOR.fireOnce( "scaytReady" ); 167 } 168 ], 169 isDebug: false 170 }; 171 172 // Append javascrip code. 173 CKEDITOR.document.getHead().append( 174 CKEDITOR.document.createElement( 'script', 175 { 176 attributes : 177 { 178 type : 'text/javascript', 179 src : "http://demo.spellchecker.net/spellcheck3/lf/dojo/dojo/dojo.xd.js" 180 } 181 }) 182 ); 183 } 184 }; 185 186 var plugin = CKEDITOR.plugins.scayt; 187 188 // Context menu constructing. 189 var addButtonCommand = function( editor, buttonName, buttonLabel, commandName, command, menugroup, menuOrder ) 190 { 191 editor.addCommand( commandName, command ); 192 193 // If the "menu" plugin is loaded, register the menu item. 194 editor.addMenuItem( commandName, 195 { 196 label : buttonLabel, 197 command : commandName, 198 group : menugroup, 199 order : menuOrder 200 }); 201 }; 202 203 var commandDefinition = 204 { 205 preserveState : true, 206 207 exec: function( editor ) 208 { 209 if ( plugin.isScaytReady( editor ) ) 210 { 211 var isEnabled = plugin.isScaytEnabled( editor ); 212 213 this.setState( isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_ON ); 214 215 var scayt_control = plugin.getScayt( editor ); 216 scayt_control.setDisabled( isEnabled ); 217 } 218 else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 ) // Load first time 219 { 220 this.setState( CKEDITOR.TRISTATE_DISABLED ); 221 222 editor.on( 'showScaytState', function() 223 { 224 this.removeListener(); 225 this.setState( plugin.isScaytEnabled( editor ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); 226 }, 227 this); 228 229 plugin.loadEngine( editor ); 230 } 231 } 232 }; 233 234 // Add scayt plugin. 235 CKEDITOR.plugins.add( 'scayt', 236 { 237 requires : [ 'menubutton' ], 238 239 beforeInit : function( editor ) 240 { 241 // Register own rbc menu group. 242 editor.config.menu_groups = 'scayt_suggest,scayt_moresuggest,scayt_control,' + editor.config.menu_groups; 243 }, 244 245 init : function( editor ) 246 { 247 var moreSuggestions = {}; 248 var mainSuggestions = {}; 249 250 // Scayt command. 251 var command = editor.addCommand( commandName, commandDefinition ); 252 253 // Add Options dialog. 254 CKEDITOR.dialog.add( commandName, CKEDITOR.getUrl( this.path + 'dialogs/options.js' ) ); 255 256 var menuGroup = 'scaytButton'; 257 editor.addMenuGroup( menuGroup ); 258 editor.addMenuItems( 259 { 260 scaytToggle : 261 { 262 label : editor.lang.scayt.enable, 263 command : commandName, 264 group : menuGroup 265 }, 266 267 scaytOptions : 268 { 269 label : editor.lang.scayt.options, 270 group : menuGroup, 271 onClick : function() 272 { 273 openPage = 'options'; 274 editor.openDialog( commandName ); 275 } 276 }, 277 278 scaytLangs : 279 { 280 label : editor.lang.scayt.langs, 281 group : menuGroup, 282 onClick : function() 283 { 284 openPage = 'langs'; 285 editor.openDialog( commandName ); 286 } 287 }, 288 289 scaytAbout : 290 { 291 label : editor.lang.scayt.about, 292 group : menuGroup, 293 onClick : function() 294 { 295 openPage = 'about'; 296 editor.openDialog( commandName ); 297 } 298 } 299 }); 300 301 editor.ui.add( "Scayt", CKEDITOR.UI_MENUBUTTON, 302 { 303 label : editor.lang.scayt.title, 304 title : editor.lang.scayt.title, 305 className : 'cke_button_scayt', 306 onRender: function() 307 { 308 command.on( 'state', function() 309 { 310 this.setState( command.state ); 311 }, 312 this); 313 }, 314 onMenu : function() 315 { 316 var isEnabled = plugin.isScaytEnabled( editor ); 317 318 editor.getMenuItem( 'scaytToggle' ).label = editor.lang.scayt[ isEnabled ? 'disable' : 'enable' ]; 319 320 return { 321 scaytToggle : CKEDITOR.TRISTATE_OFF, 322 scaytOptions : isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, 323 scaytLangs : isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, 324 scaytAbout : isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED 325 }; 326 } 327 }); 328 329 // If the "contextmenu" plugin is loaded, register the listeners. 330 if ( editor.contextMenu && editor.addMenuItems ) 331 { 332 editor.contextMenu.addListener( function( element, selection ) 333 { 334 var scayt_control = plugin.getScayt( editor ); 335 if ( !plugin.isScaytEnabled( editor ) || !element || !element.$ ) 336 return null; 337 338 var word = scayt_control.getWord( element.$ ); 339 340 if ( !word ) 341 return null; 342 343 var sLang = scayt_control.getLang(), 344 _r = {}, 345 items_suggestion = scayt.getSuggestion( word, sLang ); 346 347 // Remove unused commands and menuitems 348 for ( i in moreSuggestions ) 349 { 350 delete editor._.menuItems[ i ]; 351 delete editor._.commands[ i ]; 352 } 353 for ( i in mainSuggestions ) 354 { 355 delete editor._.menuItems[ i ]; 356 delete editor._.commands[ i ]; 357 } 358 moreSuggestions = {}; // Reset items. 359 mainSuggestions = {}; 360 361 // Rgister the More suggestions group; 362 editor.addMenuItem( 'scayt_moresuggest', 363 { 364 label : editor.lang.scayt.moreSuggestions, 365 group : 'scayt_moresuggest', 366 order : 10, 367 getItems : function() 368 { 369 return moreSuggestions; 370 } 371 }); 372 373 for ( var i = 0, l = items_suggestion.length; i < l; i += 1 ) 374 { 375 var commandName = 'scayt_suggestion_' + items_suggestion[i].replace( " ", "_" ); 376 var exec = ( function( el, s ) 377 { 378 return { 379 exec: function( editor ) 380 { 381 scayt_control.replace(el, s); 382 } 383 }; 384 })( element.$, items_suggestion[i] ); 385 386 if ( i < editor.config.scayt_maxSuggestions ) 387 { 388 addButtonCommand( editor, "button_" + commandName, items_suggestion[i], 389 commandName, exec, 'scayt_suggest', i + 1 ); 390 _r[ commandName ] = CKEDITOR.TRISTATE_OFF; 391 mainSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF; 392 } 393 else 394 { 395 addButtonCommand( editor, "button_" + commandName, items_suggestion[i], 396 commandName, exec, 'scayt_moresuggest', i + 1 ); 397 moreSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF; 398 } 399 } 400 401 var ignore_command = 402 { 403 exec: function() 404 { 405 scayt_control.ignore( element.$ ); 406 } 407 }; 408 var ignore_all_command = 409 { 410 exec: function() 411 { 412 scayt_control.ignoreAll( element.$ ); 413 } 414 }; 415 var addword_command = 416 { 417 exec: function() 418 { 419 scayt.addWordToUserDictionary( element.$ ); 420 } 421 }; 422 423 addButtonCommand( editor, "ignore", editor.lang.scayt.ignore, 424 'scayt_ignore', ignore_command, 'scayt_control', 1); 425 addButtonCommand( editor, "ignore_all", editor.lang.scayt.ignoreAll, 426 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2); 427 addButtonCommand( editor, "add_word", editor.lang.scayt.addWord, 428 'scayt_add_word', addword_command, 'scayt_control', 3); 429 430 mainSuggestions[ 'scayt_moresuggest' ] = CKEDITOR.TRISTATE_OFF; 431 mainSuggestions[ 'scayt_ignore' ] = CKEDITOR.TRISTATE_OFF; 432 mainSuggestions[ 'scayt_ignore_all' ] = CKEDITOR.TRISTATE_OFF; 433 mainSuggestions[ 'scayt_add_word' ] = CKEDITOR.TRISTATE_OFF; 434 435 return mainSuggestions; 436 }); 437 } 438 439 // Start plugin 440 if ( editor.config.scayt_autoStartup ) 441 plugin.loadEngine( editor ); 442 } 443 }); 444 })(); 445 446 CKEDITOR.config.scayt_maxSuggestions = 5; 447 CKEDITOR.config.scayt_autoStartup = false; -
_source/plugins/showblocks/plugin.js
88 88 89 89 var commandDefinition = 90 90 { 91 preserveState : true, 92 91 93 exec : function ( editor ) 92 94 { 93 var isOn = ( this.state == CKEDITOR.TRISTATE_ON ); 94 var funcName = isOn ? 'removeClass' : 'addClass'; 95 this.toggleState(); 96 this.refresh( editor ); 97 }, 98 99 refresh : function( editor ) 100 { 101 var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass'; 95 102 editor.document.getBody()[funcName]( 'cke_show_blocks' ); 96 97 this.toggleState();98 editor._.showBlocks = !isOn;99 103 } 100 104 }; 101 105 … … 107 111 { 108 112 var command = editor.addCommand( 'showblocks', commandDefinition ); 109 113 114 if ( editor.config.startupOutlineBlocks ) 115 command.setState( CKEDITOR.TRISTATE_ON ); 116 110 117 editor.addCss( cssTemplate 111 118 .replace( cssTemplateRegex, 'background-image: url(' + CKEDITOR.getUrl( this.path ) + 'images/block_' ) 112 119 .replace( cssClassRegex, 'cke_show_blocks ' ) ); 113 120 114 // Set a flag in the editor object for remembering the show block state on115 // mode switches.116 editor._.showBlocks = editor.config.startupOutlineBlocks;117 118 121 editor.ui.addButton( 'ShowBlocks', 119 122 { 120 123 label : editor.lang.showBlocks, 121 124 command : 'showblocks' 122 } 125 }); 123 126 124 // Re store the command state after mode change.127 // Refresh the command on mode changes. 125 128 editor.on( 'mode', function() 126 {127 if ( editor.mode == 'wysiwyg' && this._.showBlocks)128 command.exec();129 }, null, null, 100);129 { 130 if ( command.state != CKEDITOR.TRISTATE_DISABLED ) 131 command.refresh( editor ); 132 }); 130 133 } 131 134 }); 132 135 } )(); -
_source/plugins/toolbar/plugin.js
277 277 CKEDITOR.config.toolbar_Full = 278 278 [ 279 279 ['Source','-','Save','NewPage','Preview','-','Templates'], 280 ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker' ],280 ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], 281 281 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 282 282 ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], 283 283 '/', -
_source/skins/office2003/icons.css
143 143 background-position: 0 -176px; 144 144 } 145 145 146 .cke_skin_office2003 .cke_button_checkspell .cke_icon 146 .cke_skin_office2003 .cke_button_checkspell .cke_icon, 147 .cke_skin_office2003 .cke_button_scayt .cke_icon 147 148 { 148 149 background-position: 0 -192px; 149 150 } -
_source/skins/v2/icons.css
143 143 background-position: 0 -176px; 144 144 } 145 145 146 .cke_skin_v2 .cke_button_checkspell .cke_icon 146 .cke_skin_v2 .cke_button_checkspell .cke_icon, 147 .cke_skin_v2 .cke_button_scayt .cke_icon 147 148 { 148 149 background-position: 0 -192px; 149 150 }