Ticket #3057: 3057.patch
File 3057.patch, 58.7 KB (added by , 15 years ago) |
---|
-
_source/core/config.js
147 147 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 148 148 */ 149 149 150 plugins : 'basicstyles,blockquote,button,clipboard,colorbutton, elementspath,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,smiley,showblocks,sourcearea,stylescombo,table,specialchar,tab,templates,toolbar,undo,wysiwygarea',150 plugins : 'basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,smiley,showblocks,sourcearea,stylescombo,table,specialchar,tab,templates,toolbar,undo,wysiwygarea', 151 151 152 152 /** 153 153 * The theme to be used to build the UI. -
_source/core/dom/document.js
167 167 })(); 168 168 }, 169 169 170 getDocumentElement : function() 171 { 172 var documentElement = new CKEDITOR.dom.element( this.$.documentElement ); 173 174 return ( 175 /** @ignore */ 176 this.getDocumentElement = function() 177 { 178 return documentElement; 179 })(); 180 }, 181 170 182 /** 171 183 * Gets the window object that holds this document. 172 184 * @returns {CKEDITOR.dom.window} The window object. -
_source/core/dom/element.js
1052 1052 return null; 1053 1053 }, 1054 1054 1055 getDocumentPosition : function( )1055 getDocumentPosition : function( refDocument ) 1056 1056 { 1057 1057 var x = 0, y = 0, current = this, previous = null; 1058 1058 while ( current && !( current.getName() == 'body' || current.getName() == 'html' ) ) … … 1074 1074 previous = current; 1075 1075 current = new CKEDITOR.dom.element( current.$.offsetParent ); 1076 1076 } 1077 1078 if ( refDocument ) 1079 { 1080 var currentWindow = current.getWindow(), 1081 refWindow = refDocument.getWindow(); 1077 1082 1083 if ( !currentWindow.equals( refWindow ) && currentWindow.$.frameElement ) 1084 { 1085 var iframePosition = ( new CKEDITOR.dom.element( currentWindow.$.frameElement ) ).getDocumentPosition( refDocument ); 1086 1087 x += iframePosition.x; 1088 y += iframePosition.y; 1089 } 1090 } 1091 1078 1092 // document.body is a special case when it comes to offsetTop and offsetLeft 1079 1093 // values. 1080 1094 // 1. It matters if document.body itself is a positioned element; -
_source/core/dom/node.js
442 442 */ 443 443 getAscendant : function( name, includeSelf ) 444 444 { 445 var node = this.$; 446 if ( includeSelf && node.nodeName.toLowerCase() == name ) 447 return this; 448 while ( ( node = node.parentNode ) ) 445 var $ = this.$; 446 447 if ( !includeSelf ) 448 $ = $.parentNode; 449 450 while ( $ ) 449 451 { 450 if ( node.nodeName && node.nodeName.toLowerCase() == name ) 451 return new CKEDITOR.dom.node( node ); 452 if ( $.nodeName && $.nodeName.toLowerCase() == name ) 453 return new CKEDITOR.dom.node( $ ); 454 455 $ = $.parentNode; 452 456 } 453 457 return null; 454 458 }, 459 460 hasAscendant : function( name, includeSelf ) 461 { 462 var $ = this.$; 463 464 if ( !includeSelf ) 465 $ = $.parentNode; 466 467 while ( $ ) 468 { 469 if ( $.nodeName && $.nodeName.toLowerCase() == name ) 470 return true; 471 472 $ = $.parentNode; 473 } 474 return false; 475 }, 455 476 456 477 move : function( target, toStart ) 457 478 { -
_source/core/editor.js
96 96 var onConfigLoaded = function( editor ) 97 97 { 98 98 // Set config related properties. 99 100 var skin = editor.config.skin; 99 101 100 102 editor.skinPath = CKEDITOR.getUrl( 101 103 '_source/' + // %REMOVE_LINE% 102 'skins/' + editor.config.skin + '/' );104 'skins/' + skin + '/' ); 103 105 106 editor.skinClass = 'cke_skin_' + skin; 107 104 108 // Fire the "configLoaded" event. 105 109 editor.fireOnce( 'configLoaded' ); 106 110 -
_source/lang/en.js
99 99 link : 100 100 { 101 101 toolbar : 'Link\u200b', // IE6 BUG: A title called "Link" in an <A> tag would invalidate its padding!! 102 menu : 'Edit Link', 102 103 title : 'Link', 103 104 info : 'Link Info', 104 105 target : 'Target', … … 159 160 anchor : 160 161 { 161 162 toolbar : 'Anchor', 163 menu : 'Edit Anchor', 162 164 title : 'Anchor Properties', 163 165 name : 'Anchor Name', 164 166 errorName : 'Please type the anchor name' … … 185 187 { 186 188 toolbar : 'Table', 187 189 title : 'Table Properties', 190 menu : 'Table Properties', 191 deleteTable : 'Delete Table', 188 192 rows : 'Rows', 189 193 columns : 'Columns', 190 194 border : 'Border size', … … 212 216 invalidWidth : 'Table width must be a number.', 213 217 invalidHeight : 'Table height must be a number.', 214 218 invalidCellSpacing : 'Cell spacing must be a number.', 215 invalidCellPadding : 'Cell padding must be a number.' 219 invalidCellPadding : 'Cell padding must be a number.', 220 221 cell : 222 { 223 menu : 'Cell', 224 insertBefore : 'Insert Cell Before', 225 insertAfter : 'Insert Cell After', 226 deleteCell : 'Delete Cells', 227 merge : 'Merge Cells', 228 mergeRight : 'Merge Right', 229 mergeDown : 'Merge Down', 230 splitHorizontal : 'Split Cell Horizontally', 231 splitVertical : 'Split Cell Vertically' 232 }, 233 234 row : 235 { 236 menu : 'Row', 237 insertBefore : 'Insert Row Before', 238 insertAfter : 'Insert Row After', 239 deleteRow : 'Delete Rows' 240 }, 241 242 column : 243 { 244 menu : 'Column', 245 insertBefore : 'Insert Column Before', 246 insertAfter : 'Insert Column After', 247 deleteColumn : 'Delete Columns' 248 } 216 249 }, 217 250 218 251 // Button Dialog. … … 239 272 form : 240 273 { 241 274 title : 'Form Properties', 275 menu : 'Form Properties', 242 276 action : 'Action', 243 277 method : 'Method', 244 278 encoding : 'Encoding', … … 304 338 { 305 339 title : 'Image Properties', 306 340 titleButton : 'Image Button Properties', 341 menu : 'Image Properties', 307 342 infoTab : 'Image Info', 308 343 btnUpload : 'Send it to the Server', 309 344 url : 'URL', -
_source/plugins/clipboard/plugin.js
135 135 { 136 136 init : function( editor ) 137 137 { 138 var addButtonCommand = function ( buttonName, commandName, command)138 function addButtonCommand( buttonName, commandName, command, ctxMenuOrder ) 139 139 { 140 var lang = editor.lang[ commandName ]; 141 140 142 editor.addCommand( commandName, command ); 141 143 editor.ui.addButton( buttonName, 142 144 { 143 label : editor.lang[ commandName ],145 label : lang, 144 146 command : commandName 145 147 }); 148 149 // If the "menu" plugin is loaded, register the menu item. 150 if ( editor.addMenuItems ) 151 { 152 editor.addMenuItem( commandName, 153 { 154 label : lang, 155 command : commandName, 156 group : 'clipboard', 157 order : ctxMenuOrder 158 }); 159 } 146 160 } 147 161 148 addButtonCommand( 'Cut', 'cut', new cutCopyCmd( 'cut' ) );149 addButtonCommand( 'Copy', 'copy', new cutCopyCmd( 'copy' ) );150 addButtonCommand( 'Paste', 'paste', pasteCmd );162 addButtonCommand( 'Cut', 'cut', new cutCopyCmd( 'cut' ), 1 ); 163 addButtonCommand( 'Copy', 'copy', new cutCopyCmd( 'copy' ), 4 ); 164 addButtonCommand( 'Paste', 'paste', pasteCmd, 8 ); 151 165 152 166 CKEDITOR.dialog.add( 'paste', CKEDITOR.getUrl( this.path + 'dialogs/paste.js' ) ); 153 167 154 168 editor.on( 'key', onKey, editor ); 169 170 // If the "contextmenu" plugin is loaded, register the listeners. 171 if ( editor.contextMenu ) 172 { 173 editor.contextMenu.addListener( function() 174 { 175 return { 176 cut : CKEDITOR.TRISTATE_DISABLED , 177 copy : CKEDITOR.TRISTATE_DISABLED, 178 paste : CKEDITOR.TRISTATE_DISABLED }; 179 }); 180 } 155 181 } 156 182 }); 157 183 })(); -
_source/plugins/contextmenu/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 CKEDITOR.plugins.add( 'contextmenu', 7 { 8 requires : [ 'menu' ], 9 10 beforeInit : function( editor ) 11 { 12 editor.contextMenu = new CKEDITOR.plugins.contextMenu( editor ); 13 } 14 }); 15 16 CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass( 17 { 18 $ : function( editor ) 19 { 20 this.id = 'cke_' + CKEDITOR.tools.getNextNumber(); 21 this.editor = editor; 22 this._ = 23 { 24 listeners : [], 25 26 functionId : CKEDITOR.tools.addFunction( function( commandName ) 27 { 28 this._.panel.hide(); 29 editor.focus(); 30 editor.execCommand( commandName ); 31 }, 32 this) 33 } 34 }, 35 36 _ : 37 { 38 onMenu : function( domEvent ) 39 { 40 // Cancel the browser context menu. 41 domEvent.preventDefault(); 42 43 var menu = this._.menu, 44 editor = this.editor; 45 46 if ( menu ) 47 { 48 menu.hide(); 49 menu.removeAll(); 50 } 51 else 52 { 53 menu = this._.menu = new CKEDITOR.menu( editor ); 54 menu.onClick = function( item ) 55 { 56 menu.hide(); 57 editor.focus(); 58 59 if ( item.onClick ) 60 item.onClick(); 61 else if ( item.command ) 62 editor.execCommand( item.command ); 63 }; 64 } 65 66 var listeners = this._.listeners, 67 includedItems = []; 68 69 var selection = this.editor.getSelection(), 70 element = selection && selection.getStartElement(); 71 72 // Call all listeners, filling the list of items to be displayed. 73 for ( var i = 0 ; i < listeners.length ; i++ ) 74 { 75 var listenerItems = listeners[ i ]( element, selection ); 76 77 if ( listenerItems ) 78 { 79 for ( var itemName in listenerItems ) 80 { 81 var item = this.editor.getMenuItem( itemName ); 82 83 if ( item ) 84 { 85 item.state = listenerItems[ itemName ]; 86 menu.add( item ); 87 } 88 } 89 } 90 } 91 92 menu.show( domEvent.getTarget().getDocument().getDocumentElement(), 1, domEvent.$.clientX, domEvent.$.clientY ); 93 } 94 }, 95 96 proto : 97 { 98 addTarget : function( element ) 99 { 100 element.on( 'contextmenu', function( event ) 101 { 102 return this._.onMenu( event.data ); 103 }, 104 this ); 105 }, 106 107 addListener : function( listenerFn ) 108 { 109 this._.listeners.push( listenerFn ); 110 } 111 } 112 }); 113 114 // Fix the "contextmenu" event for DOM elements. 115 // We may do this if we identify browsers that don't support the context meny 116 // event on element directly. Leaving here for reference. 117 //if ( <specific browsers> ) 118 //{ 119 // CKEDITOR.dom.element.prototype.on = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.on, function( originalOn ) 120 // { 121 // return function( eventName ) 122 // { 123 // if ( eventName != 'contextmenu' ) 124 // return originalOn.apply( this, arguments ); 125 // 126 // // TODO : Implement the fix. 127 // }; 128 // }); 129 //} -
_source/plugins/flash/plugin.js
70 70 fakeElement.replace( embedNode ); 71 71 } 72 72 } ); 73 74 // If the "menu" plugin is loaded, register the menu items. 75 if ( editor.addMenuItems ) 76 { 77 editor.addMenuItems( 78 { 79 flash : 80 { 81 label : editor.lang.flash.properties, 82 command : 'flash', 83 group : 'flash' 84 } 85 }); 86 } 87 88 // If the "contextmenu" plugin is loaded, register the listeners. 89 if ( editor.contextMenu ) 90 { 91 editor.contextMenu.addListener( function( element, selection ) 92 { 93 if ( element && element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'flash' ) 94 return { flash : CKEDITOR.TRISTATE_OFF }; 95 }); 96 } 73 97 }, 74 98 75 99 requires : [ 'fakeobjects' ] -
_source/plugins/floatpanel/plugin.js
12 12 { 13 13 var panels = {}; 14 14 15 function getPanel( doc, parentElement, definition )15 function getPanel( doc, parentElement, definition, level ) 16 16 { 17 17 // Generates the panel key: docId-eleId-CSSs 18 18 var key = 19 19 doc.getUniqueId() + 20 20 '-' + parentElement.getUniqueId() + 21 ( ( definition.css && ( '-' + definition.css ) ) || '' ); 21 ( ( definition.css && ( '-' + definition.css ) ) || '' ) + 22 ( ( level && ( '-' + level ) ) || '' ); 22 23 23 24 var panel = panels[ key ]; 24 25 … … 39 40 40 41 CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass( 41 42 { 42 $ : function( parentElement, definition )43 $ : function( parentElement, definition, level ) 43 44 { 44 45 definition.forceIFrame = true; 45 46 46 47 var doc = parentElement.getDocument(), 47 panel = getPanel( doc, parentElement, definition ),48 panel = getPanel( doc, parentElement, definition, level || 0 ), 48 49 element = panel.element, 49 50 iframe = element.getFirst(); 50 51 51 52 this.element = element; 52 53 53 54 this._ = 54 55 { 55 56 // The panel that will be floating. 56 57 panel : panel, 58 parentElement : parentElement, 59 definition : definition, 57 60 document : doc, 58 iframe : iframe 61 iframe : iframe, 62 children : [] 59 63 } 60 64 }, 61 65 … … 71 75 return this._.panel.addListBlock( name, multiSelect ); 72 76 }, 73 77 78 getBlock : function( name ) 79 { 80 return this._.panel.getBlock( name ); 81 }, 82 74 83 showBlock : function( name, offsetParent, corner, offsetX, offsetY ) 75 84 { 76 85 var panel = this._.panel, … … 78 87 79 88 var element = this.element, 80 89 iframe = this._.iframe, 81 position = offsetParent.getDocumentPosition( );90 position = offsetParent.getDocumentPosition( element.getDocument() ); 82 91 83 92 var left = position.x + ( offsetX || 0 ), 84 93 top = position.y + ( offsetY || 0 ); … … 102 111 { 103 112 element.setStyle( 'height', block.element.$.scrollHeight + 'px' ); 104 113 } 105 114 106 115 if ( !CKEDITOR.env.gecko || panel.isLoaded ) 107 116 setHeight(); 108 117 else … … 117 126 // Non IE prefer the event into a window object. 118 127 var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow ); 119 128 120 focused.on( 'blur', CKEDITOR.tools.bind( this.hide, this ) ); 129 focused.on( 'blur', function() 130 { 131 if ( !this._.activeChild ) 132 this.hide(); 133 }, 134 this ); 121 135 136 focused.on( 'focus', function() 137 { 138 this._.focused = true; 139 this.hideChild(); 140 }, 141 this ); 142 122 143 this._.blurSet = 1; 123 144 } 124 145 … … 135 156 hide : function() 136 157 { 137 158 if ( !this.onHide || this.onHide.call( this ) !== true ) 159 { 160 this.hideChild(); 138 161 this.element.setStyle( 'display', 'none' ); 162 } 163 }, 164 165 showAsChild : function( panel, blockName, offsetParent, corner, offsetX, offsetY ) 166 { 167 this.hideChild(); 168 169 panel.onHide = CKEDITOR.tools.bind( function() 170 { 171 // Use a timeout, so we give time for this menu to get 172 // potentially focused. 173 CKEDITOR.tools.setTimeout( function() 174 { 175 if ( !this._.focused ) 176 this.hide(); 177 }, 178 0, this ); 179 }, 180 this ); 181 182 this._.activeChild = panel; 183 this._.focused = false; 184 185 panel.showBlock( blockName, offsetParent, corner, offsetX, offsetY ); 186 }, 187 188 hideChild : function() 189 { 190 var activeChild = this._.activeChild; 191 192 if ( activeChild ) 193 { 194 delete activeChild.onHide; 195 delete this._.activeChild; 196 activeChild.hide(); 197 } 139 198 } 140 199 } 141 200 }); -
_source/plugins/forms/plugin.js
11 11 { 12 12 init : function( editor ) 13 13 { 14 var lang = editor.lang; 15 14 16 editor.addCss( 15 17 'form' + 16 18 '{' + 17 19 'border: 1px dotted #FF0000;' + 18 20 'padding: 2px;' + 19 21 '}' ); 22 20 23 // All buttons use the same code to register. So, to avoid 21 24 // duplications, let's use this tool function. 22 25 var addButtonCommand = function( buttonName, commandName, dialogFile ) … … 25 28 26 29 editor.ui.addButton( buttonName, 27 30 { 28 label : editor.lang.common[ commandName ],31 label : lang.common[ commandName ], 29 32 command : commandName 30 33 }); 31 34 CKEDITOR.dialog.add( commandName, dialogFile ); … … 42 45 addButtonCommand( 'ImageButton', 'imagebutton', CKEDITOR.plugins.getPath('image') + 'dialogs/image.js' ); 43 46 addButtonCommand( 'HiddenField', 'hiddenfield', dialogPath + 'hiddenfield.js' ); 44 47 48 // If the "menu" plugin is loaded, register the menu items. 49 if ( editor.addMenuItems ) 50 { 51 editor.addMenuItems( 52 { 53 form : 54 { 55 label : lang.form.menu, 56 command : 'form', 57 group : 'form' 58 }, 59 60 checkbox : 61 { 62 label : lang.checkboxAndRadio.checkboxTitle, 63 command : 'checkbox', 64 group : 'checkbox' 65 }, 66 67 radio : 68 { 69 label : lang.checkboxAndRadio.radioTitle, 70 command : 'radio', 71 group : 'radio' 72 }, 73 74 textfield : 75 { 76 label : lang.textfield.title, 77 command : 'textfield', 78 group : 'textfield' 79 }, 80 81 hiddenfield : 82 { 83 label : lang.hidden.title, 84 command : 'hiddenfield', 85 group : 'hiddenfield' 86 }, 87 88 imagebutton : 89 { 90 label : lang.image.titleButton, 91 command : 'imagebutton', 92 group : 'imagebutton' 93 }, 94 95 button : 96 { 97 label : lang.button.title, 98 command : 'button', 99 group : 'button' 100 }, 101 102 select : 103 { 104 label : lang.select.title, 105 command : 'select', 106 group : 'select' 107 }, 108 109 textarea : 110 { 111 label : lang.textarea.title, 112 command : 'textarea', 113 group : 'textarea' 114 } 115 }); 116 } 117 118 // If the "contextmenu" plugin is loaded, register the listeners. 119 if ( editor.contextMenu ) 120 { 121 editor.contextMenu.addListener( function( element ) 122 { 123 if ( element && element.hasAscendant( 'form' ) ) 124 return { form : CKEDITOR.TRISTATE_OFF }; 125 }); 126 127 editor.contextMenu.addListener( function( element ) 128 { 129 if ( element ) 130 { 131 var name = element.getName(); 132 133 if ( name == 'select' ) 134 return { select : CKEDITOR.TRISTATE_OFF }; 135 136 if ( name == 'textarea' ) 137 return { textarea : CKEDITOR.TRISTATE_OFF }; 138 139 if ( name == 'input' ) 140 { 141 var type = element.getAttribute( 'type' ); 142 143 if ( type == 'text' || type == 'password' ) 144 return { textfield : CKEDITOR.TRISTATE_OFF }; 145 146 if ( type == 'button' || type == 'submit' || type == 'reset' ) 147 return { button : CKEDITOR.TRISTATE_OFF }; 148 149 if ( type == 'checkbox' ) 150 return { checkbox : CKEDITOR.TRISTATE_OFF }; 151 152 if ( type == 'radio' ) 153 return { radio : CKEDITOR.TRISTATE_OFF }; 154 155 if ( type == 'image' ) 156 return { imagebutton : CKEDITOR.TRISTATE_OFF }; 157 } 158 159 if ( name == 'img' && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' ) 160 return { hiddenfield : CKEDITOR.TRISTATE_OFF }; 161 } 162 }); 163 } 45 164 }, 46 165 requires : [ 'image' ] 47 166 } ); -
_source/plugins/image/plugin.js
25 25 label : editor.lang.common.image, 26 26 command : pluginName 27 27 }); 28 29 // If the "menu" plugin is loaded, register the menu items. 30 if ( editor.addMenuItems ) 31 { 32 editor.addMenuItems( 33 { 34 image : 35 { 36 label : editor.lang.image.menu, 37 command : 'image', 38 group : 'image' 39 } 40 }); 41 } 42 43 // If the "contextmenu" plugin is loaded, register the listeners. 44 if ( editor.contextMenu ) 45 { 46 editor.contextMenu.addListener( function( element, selection ) 47 { 48 if ( !element || !element.is( 'img' ) || element.getAttribute( '_cke_realelement' ) ) 49 return; 50 51 return { image : CKEDITOR.TRISTATE_OFF }; 52 }); 53 } 28 54 } 29 55 } ); 30 56 -
_source/plugins/link/plugin.js
80 80 else 81 81 anchor.addClass( 'cke_anchor' ); 82 82 } 83 } ); 83 }); 84 85 // If the "menu" plugin is loaded, register the menu items. 86 if ( editor.addMenuItems ) 87 { 88 editor.addMenuItems( 89 { 90 anchor : 91 { 92 label : editor.lang.anchor.menu, 93 command : 'anchor', 94 group : 'anchor' 95 }, 96 97 link : 98 { 99 label : editor.lang.link.menu, 100 command : 'link', 101 group : 'link', 102 order : 1 103 }, 104 105 unlink : 106 { 107 label : editor.lang.unlink, 108 command : 'unlink', 109 group : 'link', 110 order : 5 111 } 112 }); 113 } 114 115 // If the "contextmenu" plugin is loaded, register the listeners. 116 if ( editor.contextMenu ) 117 { 118 editor.contextMenu.addListener( function( element, selection ) 119 { 120 if ( !element ) 121 return; 122 123 var isAnchor = ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' ); 124 125 if ( !isAnchor ) 126 { 127 if ( !( element = element.getAscendant( 'a', true ) ) ) 128 return; 129 130 isAnchor = ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) ); 131 } 132 133 return isAnchor ? 134 { anchor : CKEDITOR.TRISTATE_OFF } : 135 { link : CKEDITOR.TRISTATE_OFF, unlink : CKEDITOR.TRISTATE_OFF }; 136 }); 137 } 84 138 }, 85 139 86 140 requires : [ 'fakeobjects' ] -
_source/plugins/menu/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 CKEDITOR.plugins.add( 'menu', 7 { 8 beforeInit : function( editor ) 9 { 10 var groups = editor.config.menu_groups.split( ',' ), 11 groupsOrder = {}; 12 13 for ( var i = 0 ; i < groups.length ; i++ ) 14 groupsOrder[ groups[ i ] ] = i + 1; 15 16 editor._.menuGroups = groupsOrder; 17 editor._.menuItems = {}; 18 } 19 }); 20 21 CKEDITOR.tools.extend( CKEDITOR.editor.prototype, 22 { 23 addMenuItem : function( name, definition ) 24 { 25 if ( this._.menuGroups[ definition.group ] ) 26 this._.menuItems[ name ] = new CKEDITOR.menuItem( this, name, definition ); 27 }, 28 29 addMenuItems : function( definitions ) 30 { 31 for ( var itemName in definitions ) 32 { 33 this.addMenuItem( itemName, definitions[ itemName ] ); 34 } 35 }, 36 37 getMenuItem : function( name ) 38 { 39 return this._.menuItems[ name ]; 40 } 41 }); 42 43 (function() 44 { 45 CKEDITOR.menu = CKEDITOR.tools.createClass( 46 { 47 $ : function( editor, level ) 48 { 49 this.id = 'cke_' + CKEDITOR.tools.getNextNumber(); 50 51 this.editor = editor; 52 this.items = []; 53 54 this._ = 55 { 56 level : level || 1 57 }; 58 }, 59 60 _ : 61 { 62 showSubMenu : function( index ) 63 { 64 var menu = this._.subMenu, 65 item = this.items[ index ], 66 subItems = item.getItems && item.getItems(); 67 68 // If this item has no subitems, we just hide the submenu, if 69 // available, and return back. 70 if ( !subItems ) 71 { 72 this._.panel.hideChild(); 73 return; 74 } 75 76 // Create the submenu, if not available, or clean the existing 77 // one. 78 if ( menu ) 79 menu.removeAll(); 80 else 81 { 82 menu = this._.subMenu = new CKEDITOR.menu( this.editor, this._.level + 1 ); 83 menu.parent = this; 84 menu.onClick = CKEDITOR.tools.bind( this.onClick, this ); 85 } 86 87 // Add all submenu items to the menu. 88 for ( var itemName in subItems ) 89 { 90 menu.add( this.editor.getMenuItem( itemName ) ); 91 } 92 93 // Get the element representing the current item. 94 var element = this._.panel.getBlock( this.id ).element.getDocument().getById( this.id + String( index ) ); 95 96 // Show the submenu. 97 menu.show( element, 2 ); 98 } 99 }, 100 101 proto : 102 { 103 add : function( item ) 104 { 105 this.items.push( item ); 106 }, 107 108 removeAll : function() 109 { 110 this.items = []; 111 }, 112 113 show : function( offsetParent, corner, offsetX, offsetY ) 114 { 115 var items = this.items, 116 editor = this.editor, 117 panel = this._.panel, 118 element = this._.element; 119 120 // Create the floating panel for this menu. 121 if ( !panel ) 122 { 123 panel = this._.panel = new CKEDITOR.ui.floatPanel( CKEDITOR.document.getBody(), 124 { 125 css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ], 126 level : this._.level - 1, 127 className : editor.skinClass + ' cke_contextmenu' 128 }, 129 this._.level); 130 131 // Create an autosize block inside the panel. 132 var block = panel.addBlock( this.id ); 133 block.autoSize = true; 134 135 element = this._.element = block.element; 136 element.addClass( editor.skinClass ); 137 element.getDocument().getBody().setStyle( 'overflow', 'hidden' ); 138 139 this._.itemOverFn = CKEDITOR.tools.addFunction( function( index ) 140 { 141 clearTimeout( this._.showSubTimeout ); 142 this._.showSubTimeout = CKEDITOR.tools.setTimeout( this._.showSubMenu, editor.config.menu_subMenuDelay, this, [ index ] ); 143 }, 144 this); 145 146 this._.itemOutFn = CKEDITOR.tools.addFunction( function( index ) 147 { 148 clearTimeout( this._.showSubTimeout ); 149 }, 150 this); 151 152 this._.itemClickFn = CKEDITOR.tools.addFunction( function( index ) 153 { 154 var item = this.items[ index ]; 155 156 if ( item.getItems ) 157 this._.showSubMenu( index ); 158 else 159 this.onClick && this.onClick( item ); 160 }, 161 this); 162 } 163 164 // Put the items in the right order. 165 sortItems( items ); 166 167 // Build the HTML that composes the menu and its items. 168 var output = [ '<div class="cke_menu">' ]; 169 170 var length = items.length, 171 lastGroup = length && items[ 0 ].group; 172 173 for ( var i = 0 ; i < length ; i++ ) 174 { 175 var item = items[ i ]; 176 if ( lastGroup != item.group ) 177 { 178 output.push( '<div class="cke_menuseparator"></div>' ); 179 lastGroup = item.group; 180 } 181 182 item.render( this, i, output ); 183 } 184 185 output.push( '</div>' ); 186 187 // Inject the HTML inside the panel. 188 element.setHtml( output.join( '' ) ); 189 190 // Show the panel. 191 if ( this.parent ) 192 this.parent._.panel.showAsChild( panel, this.id, offsetParent, corner, offsetX, offsetY ); 193 else 194 panel.showBlock( this.id, offsetParent, corner, offsetX, offsetY ); 195 }, 196 197 hide : function() 198 { 199 this._.panel && this._.panel.hide(); 200 } 201 } 202 }); 203 204 function sortItems( items ) 205 { 206 items.sort( function( itemA, itemB ) 207 { 208 if ( itemA.group < itemB.group ) 209 return -1; 210 else if ( itemA.group > itemB.group ) 211 return 1; 212 213 return itemA.order < itemB.order ? -1 : 214 itemA.order > itemB.order ? 1 : 215 0; 216 }); 217 } 218 })(); 219 220 CKEDITOR.menuItem = CKEDITOR.tools.createClass( 221 { 222 $ : function( editor, name, definition ) 223 { 224 CKEDITOR.tools.extend( this, definition, 225 // Defaults 226 { 227 order : 0, 228 className : 'cke_button_' + name 229 }); 230 231 // Transform the group name into its order number. 232 this.group = editor._.menuGroups[ this.group ]; 233 234 this.editor = editor; 235 this.name = name; 236 }, 237 238 proto : 239 { 240 render : function( menu, index, output ) 241 { 242 var id = menu.id + String( index ), 243 classes = 'cke_menuitem', 244 state = this.state || CKEDITOR.TRISTATE_OFF; 245 246 classes += ' cke_' + ( 247 state == CKEDITOR.TRISTATE_ON ? 'on' : 248 state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' : 249 'off' ); 250 251 if ( this.className ) 252 classes += ' ' + this.className; 253 254 output.push( 255 '<a id="', id, '"' + 256 ' class="', classes, '" href="javascript:void(\'', ( this.label || '' ).replace( "'", '' ), '\')"' + 257 ' title="', this.label, '"' + 258 ' tabindex="-1"' + 259 ' hidefocus="true"' ); 260 261 // Some browsers don't cancel key events in the keydown but in the 262 // keypress. 263 // TODO: Check if really needed for Gecko+Mac. 264 if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) 265 { 266 output.push( 267 ' onkeypress="return false;"' ); 268 } 269 270 // With Firefox, we need to force the button to redraw, otherwise it 271 // will remain in the focus state. 272 if ( CKEDITOR.env.gecko ) 273 { 274 output.push( 275 ' onblur="this.style.cssText = this.style.cssText;"' ); 276 } 277 278 output.push( 279 // ' onkeydown="return CKEDITOR.ui.button._.keydown(', index, ', event);"' + 280 ' onmouseover="CKEDITOR.tools.callFunction(', menu._.itemOverFn, ',', index, ');"' + 281 ' onmouseout="CKEDITOR.tools.callFunction(', menu._.itemOutFn, ',', index, ');"' + 282 ' onclick="CKEDITOR.tools.callFunction(', menu._.itemClickFn, ',', index, ');"' + 283 '>' + 284 '<span class="cke_icon"></span>' + 285 '<span class="cke_label">' ); 286 287 if ( this.getItems ) 288 { 289 output.push( 290 '<span class="cke_menuarrow"></span>' ); 291 } 292 293 output.push( 294 this.label, 295 '</span>' + 296 '</a>' ); 297 } 298 } 299 }); 300 301 CKEDITOR.config.menu_subMenuDelay = 400; 302 CKEDITOR.config.menu_groups = 303 'clipboard,' + 304 'form,' + 305 'tablecell,tablerow,tablecolumn,table,'+ 306 'anchor,link,image,flash,' + 307 'checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'; -
_source/plugins/panel/plugin.js
1 /*1 /* 2 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ … … 158 158 return block; 159 159 }, 160 160 161 getBlock : function( name ) 162 { 163 return this._.blocks[ name ]; 164 }, 165 161 166 showBlock : function( name ) 162 167 { 163 168 var blocks = this._.blocks, -
_source/plugins/richcombo/plugin.js
32 32 }); 33 33 34 34 // We don't want the panel definition in this object. 35 var panelDefinition = this.panel || {}; 35 36 delete this.panel; 36 37 37 38 this.id = CKEDITOR.tools.getNextNumber(); 38 39 39 this.document = ( definition.panel40 && definition.panel.parent41 && definition.panel.parent.getDocument() )40 this.document = ( panelDefinition 41 && panelDefinition.parent 42 && panelDefinition.parent.getDocument() ) 42 43 || CKEDITOR.document; 43 44 45 panelDefinition.className = ( panelDefinition.className || '' ) + ' cke_rcombopanel'; 46 44 47 this._ = 45 48 { 46 panelDefinition : definition.panel,49 panelDefinition : panelDefinition, 47 50 items : {} 48 51 }; 49 52 }, … … 164 167 if ( this._.panel ) 165 168 return; 166 169 167 var panelDefinition = this._.panelDefinition || {},170 var panelDefinition = this._.panelDefinition, 168 171 panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(), 169 172 panel = new CKEDITOR.ui.floatPanel( panelParentElement, panelDefinition ), 170 173 list = panel.addListBlock( this.id, this.multiSelect ), -
_source/plugins/stylescombo/plugin.js
149 149 { 150 150 var selection = editor.getSelection(); 151 151 152 if ( CKEDITOR.env.ie )152 if ( CKEDITOR.env.ie && selection ) 153 153 { 154 154 editor.focus(); 155 155 saveRanges = selection.getRanges(); -
_source/plugins/table/plugin.js
7 7 { 8 8 init : function( editor ) 9 9 { 10 var table = CKEDITOR.plugins.table; 10 var table = CKEDITOR.plugins.table, 11 lang = editor.lang.table; 11 12 12 13 editor.addCommand( 'table', new CKEDITOR.dialogCommand( 'table' ) ); 13 14 editor.addCommand( 'tableProperties', new CKEDITOR.dialogCommand( 'tableProperties' ) ); 14 15 editor.ui.addButton( 'Table', 15 16 { 16 label : editor.lang.table.toolbar,17 label : lang.toolbar, 17 18 command : 'table' 18 19 }); 19 20 20 21 CKEDITOR.dialog.add( 'table', this.path + 'dialogs/table.js' ); 21 22 CKEDITOR.dialog.add( 'tableProperties', this.path + 'dialogs/table.js' ); 23 24 // If the "menu" plugin is loaded, register the menu items. 25 if ( editor.addMenuItems ) 26 { 27 editor.addMenuItems( 28 { 29 table : 30 { 31 label : lang.menu, 32 command : 'tableProperties', 33 group : 'table', 34 order : 5 35 }, 36 37 tabledelete : 38 { 39 label : lang.deleteTable, 40 command : 'tableDelete', 41 group : 'table', 42 order : 1 43 }, 44 45 tablecell : 46 { 47 label : lang.cell.menu, 48 group : 'tablecell', 49 order : 1, 50 getItems : function() 51 { 52 return { 53 tablecell_insertBefore : CKEDITOR.TRISTATE_OFF, 54 tablecell_insertAfter : CKEDITOR.TRISTATE_OFF, 55 tablecell_delete : CKEDITOR.TRISTATE_OFF 56 }; 57 } 58 }, 59 60 tablecell_insertBefore : 61 { 62 label : lang.cell.insertBefore, 63 group : 'tablecell', 64 order : 5 65 }, 66 67 tablecell_insertAfter : 68 { 69 label : lang.cell.insertAfter, 70 group : 'tablecell', 71 order : 10 72 }, 73 74 tablecell_delete : 75 { 76 label : lang.cell.deleteCell, 77 group : 'tablecell', 78 order : 15 79 }, 80 81 tablerow : 82 { 83 label : lang.row.menu, 84 group : 'tablerow', 85 order : 1, 86 getItems : function() 87 { 88 return { 89 tablerow_insertBefore : CKEDITOR.TRISTATE_OFF, 90 tablerow_insertAfter : CKEDITOR.TRISTATE_OFF, 91 tablerow_delete : CKEDITOR.TRISTATE_OFF 92 }; 93 } 94 }, 95 96 tablerow_insertBefore : 97 { 98 label : lang.row.insertBefore, 99 group : 'tablerow', 100 order : 5 101 }, 102 103 tablerow_insertAfter : 104 { 105 label : lang.row.insertAfter, 106 group : 'tablerow', 107 order : 10 108 }, 109 110 tablerow_delete : 111 { 112 label : lang.row.deleteRow, 113 group : 'tablerow', 114 order : 15 115 }, 116 117 tablecolumn : 118 { 119 label : lang.column.menu, 120 group : 'tablecolumn', 121 order : 1, 122 getItems : function() 123 { 124 return { 125 tablecolumn_insertBefore : CKEDITOR.TRISTATE_OFF, 126 tablecolumn_insertAfter : CKEDITOR.TRISTATE_OFF, 127 tablecolumn_delete : CKEDITOR.TRISTATE_OFF 128 }; 129 } 130 }, 131 132 tablecolumn_insertBefore : 133 { 134 label : lang.column.insertBefore, 135 group : 'tablecolumn', 136 order : 5 137 }, 138 139 tablecolumn_insertAfter : 140 { 141 label : lang.column.insertAfter, 142 group : 'tablecolumn', 143 order : 10 144 }, 145 146 tablecolumn_delete : 147 { 148 label : lang.column.deleteColumn, 149 group : 'tablecolumn', 150 order : 15 151 } 152 }); 153 } 154 155 // If the "contextmenu" plugin is loaded, register the listeners. 156 if ( editor.contextMenu ) 157 { 158 editor.contextMenu.addListener( function( element, selection ) 159 { 160 if ( !element ) 161 return; 162 163 var isTable = element.is( 'table' ) ; 164 var isCell = !isTable && element.hasAscendant( 'table' ) ; 165 166 if ( isTable || isCell ) 167 { 168 var ret = isCell ? 169 { 170 tablecell : CKEDITOR.TRISTATE_OFF, 171 tablerow : CKEDITOR.TRISTATE_OFF, 172 tablecolumn : CKEDITOR.TRISTATE_OFF 173 } 174 : {}; 175 176 ret.tabledelete = CKEDITOR.TRISTATE_OFF; 177 ret.table = CKEDITOR.TRISTATE_OFF; 178 179 return ret; 180 } 181 182 return null; 183 }); 184 } 22 185 } 23 186 } ); -
_source/plugins/wysiwygarea/plugin.js
249 249 250 250 editor.fire( 'contentDom' ); 251 251 252 // Adds the document body as a context menu target. 253 if ( editor.contextMenu ) 254 editor.contextMenu.addTarget( domDocument ); 255 252 256 if ( fireMode ) 253 257 { 254 258 editor.mode = 'wysiwyg'; -
_source/skins/default/editor.css
5 5 6 6 @import url("reset.css"); 7 7 @import url("mainui.css"); 8 @import url("panel.css"); 8 9 @import url("toolbar.css"); 9 @import url(" panel.css");10 @import url("menu.css"); 10 11 @import url("richcombo.css"); 11 12 @import url("elementspath.css"); 13 @import url("icons.css"); 12 14 @import url("presets.css"); 13 15 14 16 /* Restore the container visibility */ -
_source/skins/default/icons.css
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 .cke_skin_default a.cke_button_source .cke_icon 7 { 8 background-position: 0 0; 9 } 10 11 .cke_skin_default a.cke_button_newpage .cke_icon 12 { 13 background-position: 0 -48px; 14 } 15 16 .cke_skin_default a.cke_button_preview .cke_icon 17 { 18 background-position: 0 -64px; 19 } 20 21 .cke_skin_default a.cke_button_cut .cke_icon 22 { 23 background-position: 0 -96px; 24 } 25 26 .cke_skin_default a.cke_button_copy .cke_icon 27 { 28 background-position: 0 -112px; 29 } 30 31 .cke_skin_default a.cke_button_paste .cke_icon 32 { 33 background-position: 0 -128px; 34 } 35 36 .cke_skin_default a.cke_button_pastetext .cke_icon 37 { 38 background-position: 0 -144px; 39 } 40 41 .cke_skin_default a.cke_button_find .cke_icon 42 { 43 background-position: 0 -240px; 44 } 45 46 .cke_skin_default a.cke_button_replace .cke_icon 47 { 48 background-position: 0 -256px; 49 } 50 51 .cke_skin_default a.cke_button_selectAll .cke_icon 52 { 53 background-position: 0 -272px; 54 } 55 56 .cke_skin_default a.cke_button_removeFormat .cke_icon 57 { 58 background-position: 0 -288px; 59 } 60 61 .cke_skin_default a.cke_button_bold .cke_icon 62 { 63 background-position: 0 -304px; 64 } 65 66 .cke_skin_default a.cke_button_italic .cke_icon 67 { 68 background-position: 0 -320px; 69 } 70 71 .cke_skin_default a.cke_button_underline .cke_icon 72 { 73 background-position: 0 -336px; 74 } 75 76 .cke_skin_default a.cke_button_strike .cke_icon 77 { 78 background-position: 0 -352px; 79 } 80 81 .cke_skin_default a.cke_button_subscript .cke_icon 82 { 83 background-position: 0 -368px; 84 } 85 86 .cke_skin_default a.cke_button_superscript .cke_icon 87 { 88 background-position: 0 -384px; 89 } 90 91 .cke_skin_default a.cke_button_table .cke_icon 92 { 93 background-position: 0 -608px; 94 } 95 96 .cke_skin_default a.cke_button_horizontalrule .cke_icon 97 { 98 background-position: 0 -624px; 99 } 100 101 .cke_skin_default a.cke_button_smiley .cke_icon 102 { 103 background-position: 0 -640px; 104 } 105 106 .cke_skin_default a.cke_button_link .cke_icon 107 { 108 background-position: 0 -528px; 109 } 110 111 .cke_skin_default a.cke_button_unlink .cke_icon 112 { 113 background-position: 0 -544px; 114 } 115 116 .cke_skin_default a.cke_button_anchor .cke_icon 117 { 118 background-position: 0 -560px; 119 } 120 121 .cke_skin_default a.cke_button_image .cke_icon 122 { 123 background-position: 0 -576px; 124 } 125 126 .cke_skin_default a.cke_button_flash .cke_icon 127 { 128 background-position: 0 -592px; 129 } 130 131 .cke_skin_default a.cke_button_specialchar .cke_icon 132 { 133 background-position: 0 -656px; 134 } 135 136 .cke_skin_default a.cke_button_pagebreak .cke_icon 137 { 138 background-position: 0 -672px; 139 } 140 141 .cke_skin_default a.cke_button_print .cke_icon 142 { 143 background-position: 0 -176px; 144 } 145 146 .cke_skin_default a.cke_button_pagebreak .cke_icon 147 { 148 background-position: 0 -672px; 149 } 150 151 .cke_skin_default a.cke_button_textcolor .cke_icon 152 { 153 background-position: 0 -704px; 154 } 155 156 .cke_skin_default a.cke_button_bgcolor .cke_icon 157 { 158 background-position: 0 -720px; 159 } 160 161 .cke_skin_default a.cke_button_form .cke_icon 162 { 163 background-position: 0 -752px; 164 } 165 166 .cke_skin_default a.cke_button_checkbox .cke_icon 167 { 168 background-position: 0 -768px; 169 } 170 171 .cke_skin_default a.cke_button_radio .cke_icon 172 { 173 background-position: 0 -784px; 174 } 175 176 .cke_skin_default a.cke_button_textfield .cke_icon 177 { 178 background-position: 0 -800px; 179 } 180 181 .cke_skin_default a.cke_button_textarea .cke_icon 182 { 183 background-position: 0 -816px; 184 } 185 .cke_skin_default a.cke_button_showblocks .cke_icon 186 { 187 background-position: 0 -1136px; 188 } 189 190 .cke_skin_default a.cke_button_select .cke_icon 191 { 192 background-position: 0 -832px; 193 } 194 195 .cke_skin_default a.cke_button_button .cke_icon 196 { 197 background-position: 0 -848px; 198 } 199 200 .cke_skin_default a.cke_button_imagebutton .cke_icon 201 { 202 background-position: 0 -864px; 203 } 204 205 .cke_skin_default a.cke_button_hiddenfield .cke_icon 206 { 207 background-position: 0 -880px; 208 } 209 .cke_skin_default a.cke_button_undo .cke_icon 210 { 211 background-position: 0 -208px; 212 } 213 .cke_skin_default a.cke_button_redo .cke_icon 214 { 215 background-position: 0 -224px; 216 } 217 218 .cke_skin_default a.cke_button_templates .cke_icon 219 { 220 background-position: 0 -80px; 221 } 222 223 .cke_skin_default a.cke_button_numberedlist .cke_icon 224 { 225 background-position: 0 -400px; 226 } 227 228 .cke_skin_default a.cke_button_bulletedlist .cke_icon 229 { 230 background-position: 0 -416px; 231 } 232 233 .cke_skin_default a.cke_button_outdent .cke_icon 234 { 235 background-position: 0 -432px; 236 } 237 238 .cke_skin_default a.cke_button_indent .cke_icon 239 { 240 background-position: 0 -448px; 241 } 242 243 .cke_skin_default a.cke_button_justifyleft .cke_icon 244 { 245 background-position: 0 -464px; 246 } 247 248 .cke_skin_default a.cke_button_justifycenter .cke_icon 249 { 250 background-position: 0 -480px; 251 } 252 253 .cke_skin_default a.cke_button_justifyright .cke_icon 254 { 255 background-position: 0 -496px; 256 } 257 258 .cke_skin_default a.cke_button_justifyblock .cke_icon 259 { 260 background-position: 0 -512px; 261 } 262 263 .cke_skin_default a.cke_button_blockquote .cke_icon 264 { 265 background-position: 0 -1152px; 266 } 267 268 .cke_skin_default a.cke_button_flash .cke_icon 269 { 270 background-position: 0 -592px; 271 } 272 273 .cke_skin_default a.cke_button_pastefromword .cke_icon 274 { 275 background-position: 0 -160px; 276 } -
_source/skins/default/menu.css
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 .cke_skin_default.cke_contextmenu 7 { 8 padding: 2px; 9 } 10 11 .cke_skin_default a.cke_menuitem 12 { 13 display:block; 14 } 15 16 .cke_skin_default a:hover.cke_menuitem, 17 .cke_skin_default a:focus.cke_menuitem 18 { 19 background-color: #8f8f73; 20 display:block; 21 } 22 23 .cke_skin_default a.cke_menuitem.cke_disabled 24 { 25 filter: alpha(opacity=30); /* IE */ 26 opacity : 0.3; /* Safari, Opera and Mozilla */ 27 } 28 29 .cke_skin_default a.cke_menuitem .cke_icon 30 { 31 background-image: url(icons.gif); 32 background-position: 100px; 33 background-repeat:no-repeat; 34 background-color: #e3e3c7; 35 width: 16px; 36 height: 16px; 37 float: left; 38 border: solid 4px #e3e3c7; 39 filter: alpha(opacity=70); /* IE */ 40 opacity: 0.70; /* Safari, Opera and Mozilla */ 41 } 42 43 .cke_skin_default a:hover.cke_menuitem .cke_icon, 44 .cke_skin_default a:focus.cke_menuitem .cke_icon 45 { 46 background-color: #737357; 47 border: solid 4px #737357; 48 filter: alpha(opacity=100); /* IE */ 49 opacity: 1; /* Safari, Opera and Mozilla */ 50 } 51 52 .cke_skin_default a.cke_menuitem .cke_label 53 { 54 display:block; 55 padding-right: 3px; 56 padding-top: 5px; 57 height:19px; 58 margin-left: 28px; 59 background-color: #fff; 60 } 61 62 .cke_skin_default a:hover.cke_menuitem .cke_label, 63 .cke_skin_default a:focus.cke_menuitem .cke_label 64 { 65 color: #fff; 66 background-color: #8f8f73; 67 } 68 69 .cke_skin_default .cke_menuseparator 70 { 71 background-color: #e3e3c7; 72 height: 2px; 73 filter: alpha(opacity=70); /* IE */ 74 opacity: 0.70; /* Safari, Opera and Mozilla */ 75 } 76 77 .cke_skin_default .cke_menuarrow 78 { 79 background-image: url(images/toolbar.arrowright.gif); 80 height: 7px; 81 width: 7px; 82 float: right; 83 margin-right: 2px; 84 margin-top: 3px; 85 } 86 -
_source/skins/default/panel.css
5 5 6 6 .cke_skin_default.cke_panel 7 7 { 8 border: 1px solid #316ac5;8 border: 1px solid #8f8f73; 9 9 background-color: #fff; 10 10 11 11 width: 120px; … … 13 13 14 14 overflow:hidden; 15 15 16 -moz-border-radius-bottomright: 3px; 17 -webkit-border-bottom-right-radius: 3px; 18 border-bottom-left-radius: 3px; 19 -moz-border-radius-bottomleft: 3px; 20 -webkit-border-bottom-left-radius: 3px; 21 border-bottom-left-radius: 3px; 22 -moz-border-radius-topright: 3px; 23 -webkit-border-top-right-radius: 3px; 24 border-top-right-radius: 3px; 16 -moz-border-radius: 3px; 17 -webkit-border-radius: 3px; 18 border-radius: 3px; 25 19 } 26 20 27 21 /* Ideally we would use "inherit here"... but you know... IE :( */ … … 123 117 margin-top: 3px; 124 118 margin-bottom: 3px; 125 119 } 126 /*127 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.128 For licensing, see LICENSE.html or http://ckeditor.com/license129 */130 120 131 .cke_skin_default.cke_panel132 {133 border: 1px solid #316ac5;134 background-color: #fff;135 136 width: 120px;137 height: 100px;138 139 overflow:hidden;140 141 -moz-border-radius-bottomright: 3px;142 -webkit-border-bottom-right-radius: 3px;143 border-bottom-left-radius: 3px;144 -moz-border-radius-bottomleft: 3px;145 -webkit-border-bottom-left-radius: 3px;146 border-bottom-left-radius: 3px;147 -moz-border-radius-topright: 3px;148 -webkit-border-top-right-radius: 3px;149 border-top-right-radius: 3px;150 }151 152 .cke_skin_default.cke_panel.cke_format153 {154 width: 150px;155 height: 170px;156 }157 158 /* Ideally we would use "inherit here"... but you know... IE :( */159 .cke_skin_default.cke_panel iframe160 {161 width: 100%;162 height: 100%;163 }164 165 /*166 * All the following styles are to be used inside the iframe that holds panel167 * contents. We don't use the cke_skin_default there to avoid the reset to be168 * active.169 * This is not an issue as we'll never have two skins running inside the same170 * panel iframe.171 */172 173 body.cke_panel_frame174 {175 overflow: auto;176 overflow-x: hidden;177 }178 179 ul.cke_panel_list180 {181 list-style-type: none;182 margin: 3px;183 padding: 0px;184 white-space: nowrap;185 }186 187 li.cke_panel_listItem188 {189 margin: 0px;190 }191 192 .cke_panel_listItem a193 {194 padding: 2px;195 display: block;196 border: 1px solid #fff;197 color: inherit;198 text-decoration: none;199 overflow: hidden;200 text-overflow: ellipsis;201 }202 203 /* IE6 */204 * html .cke_panel_listItem a205 {206 width : 100%;207 208 /* IE is not able to inherit the color, so we must force it to black */209 color: #000;210 }211 212 /* IE7 */213 *:first-child+html .cke_panel_listItem a214 {215 /* IE is not able to inherit the color, so we must force it to black */216 color: #000;217 }218 219 .cke_panel_listItem.cke_selected a220 {221 border: 1px solid #ccc;222 background-color: #e9f5ff;223 }224 225 .cke_panel_listItem a:hover,226 .cke_panel_listItem a:focus,227 .cke_panel_listItem a:active228 {229 border-color: #316ac5;230 background-color: #dff1ff;231 }232 233 .cke_panel_grouptitle234 {235 font-size: 11px;236 font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif;237 font-weight: bold;238 white-space: nowrap;239 background-color: #dcdcdc;240 color: #000;241 margin:0px;242 padding:3px;243 }244 245 .cke_panel_listItem p,246 .cke_panel_listItem h1,247 .cke_panel_listItem h2,248 .cke_panel_listItem h3,249 .cke_panel_listItem h4,250 .cke_panel_listItem h5,251 .cke_panel_listItem h6,252 .cke_panel_listItem pre253 {254 margin-top: 3px;255 margin-bottom: 3px;256 }257 258 121 .cke_skin_default.cke_panel.cke_button_textcolor, 259 122 .cke_skin_default.cke_panel.cke_button_bgcolor 260 123 { -
_source/skins/default/presets.css
3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ 5 5 6 /* "Source" button label */ 7 .cke_skin_default a.cke_button_source .cke_label 8 { 9 display: inline; 10 } 11 6 12 /* "Styles" panel size */ 7 13 .cke_skin_default.cke_panel.cke_styles 8 14 { -
_source/skins/default/richcombo.css
6 6 float: left; 7 7 } 8 8 9 .cke_skin_default.cke_rcombopanel 10 { 11 border: 1px solid #316ac5; 12 -moz-border-radius-topleft: 0; 13 -webkit-border-top-left-radius: 0; 14 border-top-left-radius: 0; 15 } 16 9 17 /* IE6 only */ 10 18 /*\*/ 11 19 * html .cke_skin_default .cke_rcombo -
_source/skins/default/toolbar.css
158 158 { 159 159 float: right; 160 160 } 161 162 .cke_skin_default a.cke_button_source .cke_icon163 {164 background-position: 0 0;165 }166 167 .cke_skin_default a.cke_button_source .cke_label168 {169 display: inline;170 }171 172 .cke_skin_default a.cke_button_newpage .cke_icon173 {174 background-position: 0 -48px;175 }176 177 .cke_skin_default a.cke_button_preview .cke_icon178 {179 background-position: 0 -64px;180 }181 182 .cke_skin_default a.cke_button_cut .cke_icon183 {184 background-position: 0 -96px;185 }186 187 .cke_skin_default a.cke_button_copy .cke_icon188 {189 background-position: 0 -112px;190 }191 192 .cke_skin_default a.cke_button_paste .cke_icon193 {194 background-position: 0 -128px;195 }196 197 .cke_skin_default a.cke_button_pastetext .cke_icon198 {199 background-position: 0 -144px;200 }201 202 .cke_skin_default a.cke_button_find .cke_icon203 {204 background-position: 0 -240px;205 }206 207 .cke_skin_default a.cke_button_replace .cke_icon208 {209 background-position: 0 -256px;210 }211 212 .cke_skin_default a.cke_button_selectAll .cke_icon213 {214 background-position: 0 -272px;215 }216 217 .cke_skin_default a.cke_button_removeFormat .cke_icon218 {219 background-position: 0 -288px;220 }221 222 .cke_skin_default a.cke_button_bold .cke_icon223 {224 background-position: 0 -304px;225 }226 227 .cke_skin_default a.cke_button_italic .cke_icon228 {229 background-position: 0 -320px;230 }231 232 .cke_skin_default a.cke_button_underline .cke_icon233 {234 background-position: 0 -336px;235 }236 237 .cke_skin_default a.cke_button_strike .cke_icon238 {239 background-position: 0 -352px;240 }241 242 .cke_skin_default a.cke_button_subscript .cke_icon243 {244 background-position: 0 -368px;245 }246 247 .cke_skin_default a.cke_button_superscript .cke_icon248 {249 background-position: 0 -384px;250 }251 252 .cke_skin_default a.cke_button_table .cke_icon253 {254 background-position: 0 -608px;255 }256 257 .cke_skin_default a.cke_button_horizontalrule .cke_icon258 {259 background-position: 0 -624px;260 }261 262 .cke_skin_default a.cke_button_smiley .cke_icon263 {264 background-position: 0 -640px;265 }266 267 .cke_skin_default a.cke_button_link .cke_icon268 {269 background-position: 0 -528px;270 }271 272 .cke_skin_default a.cke_button_unlink .cke_icon273 {274 background-position: 0 -544px;275 }276 277 .cke_skin_default a.cke_button_anchor .cke_icon278 {279 background-position: 0 -560px;280 }281 282 .cke_skin_default a.cke_button_image .cke_icon283 {284 background-position: 0 -576px;285 }286 287 .cke_skin_default a.cke_button_flash .cke_icon288 {289 background-position: 0 -592px;290 }291 292 .cke_skin_default a.cke_button_specialchar .cke_icon293 {294 background-position: 0 -656px;295 }296 297 .cke_skin_default a.cke_button_pagebreak .cke_icon298 {299 background-position: 0 -672px;300 }301 302 .cke_skin_default a.cke_button_print .cke_icon303 {304 background-position: 0 -176px;305 }306 307 .cke_skin_default a.cke_button_pagebreak .cke_icon308 {309 background-position: 0 -672px;310 }311 312 .cke_skin_default a.cke_button_textcolor .cke_icon313 {314 background-position: 0 -704px;315 }316 317 .cke_skin_default a.cke_button_bgcolor .cke_icon318 {319 background-position: 0 -720px;320 }321 322 .cke_skin_default a.cke_button_form .cke_icon323 {324 background-position: 0 -752px;325 }326 327 .cke_skin_default a.cke_button_checkbox .cke_icon328 {329 background-position: 0 -768px;330 }331 332 .cke_skin_default a.cke_button_radio .cke_icon333 {334 background-position: 0 -784px;335 }336 337 .cke_skin_default a.cke_button_textfield .cke_icon338 {339 background-position: 0 -800px;340 }341 342 .cke_skin_default a.cke_button_textarea .cke_icon343 {344 background-position: 0 -816px;345 }346 .cke_skin_default a.cke_button_showblocks .cke_icon347 {348 background-position: 0 -1136px;349 }350 351 .cke_skin_default a.cke_button_select .cke_icon352 {353 background-position: 0 -832px;354 }355 356 .cke_skin_default a.cke_button_button .cke_icon357 {358 background-position: 0 -848px;359 }360 361 .cke_skin_default a.cke_button_imagebutton .cke_icon362 {363 background-position: 0 -864px;364 }365 366 .cke_skin_default a.cke_button_hiddenfield .cke_icon367 {368 background-position: 0 -880px;369 }370 .cke_skin_default a.cke_button_undo .cke_icon371 {372 background-position: 0 -208px;373 }374 .cke_skin_default a.cke_button_redo .cke_icon375 {376 background-position: 0 -224px;377 }378 379 .cke_skin_default a.cke_button_templates .cke_icon380 {381 background-position: 0 -80px;382 }383 384 .cke_skin_default a.cke_button_numberedlist .cke_icon385 {386 background-position: 0 -400px;387 }388 389 .cke_skin_default a.cke_button_bulletedlist .cke_icon390 {391 background-position: 0 -416px;392 }393 394 .cke_skin_default a.cke_button_outdent .cke_icon395 {396 background-position: 0 -432px;397 }398 399 .cke_skin_default a.cke_button_indent .cke_icon400 {401 background-position: 0 -448px;402 }403 404 .cke_skin_default a.cke_button_justifyleft .cke_icon405 {406 background-position: 0 -464px;407 }408 409 .cke_skin_default a.cke_button_justifycenter .cke_icon410 {411 background-position: 0 -480px;412 }413 414 .cke_skin_default a.cke_button_justifyright .cke_icon415 {416 background-position: 0 -496px;417 }418 419 .cke_skin_default a.cke_button_justifyblock .cke_icon420 {421 background-position: 0 -512px;422 }423 424 .cke_skin_default a.cke_button_blockquote .cke_icon425 {426 background-position: 0 -1152px;427 }428 429 .cke_skin_default a.cke_button_flash .cke_icon430 {431 background-position: 0 -592px;432 }433 434 .cke_skin_default a.cke_button_pastefromword .cke_icon435 {436 background-position: 0 -160px;437 } -
_source/themes/default/theme.js
56 56 // bring any evident problem as it seems that tables are treated 57 57 // differently by the browsers ("semi-inline"). 58 58 var container = CKEDITOR.dom.element.createFromHtml( [ 59 '<span id="cke_', name, '" onmousedown="return false;" class="cke_container cke_skin_', editor.config.skin, ' ', browserCssClass,59 '<span id="cke_', name, '" onmousedown="return false;" class="cke_container ', editor.skinClass, ' ', browserCssClass, 60 60 ' cke_', editor.lang.dir, '" dir="', editor.lang.dir, '" title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '">' + 61 61 '<table class="cke_editor" border="0" cellspacing="0" cellpadding="0" style="width:', width, ';height:', height, '"><tbody>' + 62 62 '<tr', topHtml ? '' : ' style="display:none"', '><td id="cke_top_' , name, '" class="cke_top">' , topHtml , '</td></tr>' + -
ckeditor.pack
122 122 '_source/plugins/button/plugin.js', 123 123 '_source/plugins/clipboard/plugin.js', 124 124 '_source/plugins/colorbutton/plugin.js', 125 '_source/plugins/contextmenu/plugin.js', 125 126 '_source/plugins/elementspath/plugin.js', 126 127 '_source/plugins/find/plugin.js', 127 128 '_source/plugins/flash/plugin.js', … … 158 159 '_source/plugins/domiterator/plugin.js', 159 160 '_source/plugins/panelbutton/plugin.js', 160 161 '_source/plugins/floatpanel/plugin.js', 162 '_source/plugins/menu/plugin.js', 161 163 '_source/plugins/selection/plugin.js', 162 164 '_source/plugins/fakeobjects/plugin.js', 163 165 '_source/plugins/richcombo/plugin.js',