' );
- var colorCode = colors[ i ];
+ var parts = colors[ i ].split( '/' ),
+ colorName = parts[ 0 ],
+ colorCode = parts[ 1 ] || colorName;
+
+ // The data can be only a color code (without #) or colorName + color code
+ // If only a color code is provided, then the colorName is the color with the hash
+ if (!parts[1])
+ colorName = '#' + colorName;
+
var colorLabel = editor.lang.colors[ colorCode ] || colorCode;
output.push(
@@ -129,5 +137,5 @@
'' +
@@ -173,4 +181,8 @@
* Defines the colors to be displayed in the color selectors. It's a string
* containing the hexadecimal notation for HTML colors, without the "#" prefix.
+ *
+ * Since 3.3: A name may be optionally defined by prefixing the entries with the
+ * name and the slash character. For example, "FontColor1/FF9900" will be
+ * displayed as the color #FF9900 in the selector, but will be outputted as "FontColor1".
* @type String
* @default '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF'
@@ -178,4 +190,6 @@
* // Brazil colors only.
* config.colorButton_colors = '00923E,F8C100,28166F';
+ * @example
+ * config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00'
*/
CKEDITOR.config.colorButton_colors =
@@ -224,4 +238,10 @@
{
element : 'span',
- styles : { 'background-color' : '#(color)' }
+ styles : { 'background-color' : '#(color)' },
+
+ // It's better to apply background color as the innermost style. (#3599)
+ childRule : function( element )
+ {
+ return false;
+ }
};
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/colordialog/dialogs/colordialog.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/colordialog/dialogs/colordialog.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/colordialog/dialogs/colordialog.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/colordialog/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/colordialog/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/colordialog/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-( function()
+( function()
{
CKEDITOR.plugins.colordialog =
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/contextmenu/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/contextmenu/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/contextmenu/plugin.js (revision 5332)
@@ -37,5 +37,5 @@
this);
- this._.definiton =
+ this.definition =
{
panel:
@@ -44,5 +44,5 @@
attributes :
{
- 'aria-label' : editor.lang.common.options
+ 'aria-label' : editor.lang.contextmenu.options
}
}
@@ -64,5 +64,5 @@
else
{
- menu = this._.menu = new CKEDITOR.menu( editor, this._.definiton );
+ menu = this._.menu = new CKEDITOR.menu( editor, this.definition );
menu.onClick = CKEDITOR.tools.bind( function( item )
{
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/dialog/dialogDefinition.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/dialog/dialogDefinition.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/dialog/dialogDefinition.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/dialog/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/dialog/plugin.js (revision 5332)
@@ -336,5 +336,5 @@
processed = 1;
}
- else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode )
+ else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 )
{
// Alt-F10 puts focus into the current tab item in the tab bar.
@@ -506,6 +506,4 @@
for ( i = 0 ; i < buttons.length ; i++ )
this._.buttons[ buttons[i].id ] = buttons[i];
-
- CKEDITOR.skins.load( editor, 'dialog' );
};
@@ -869,5 +867,5 @@
expand : !!contents.expand,
padding : contents.padding,
- style : contents.style || 'width: 100%;' + ( CKEDITOR.env.ie6Compat ? '' : 'height: 100%;' )
+ style : contents.style || 'width: 100%; height: 100%;'
}, pageHtml );
@@ -894,15 +892,10 @@
page.setAttribute( 'aria-labelledby', tabId );
- // If only a single page exist, a different style is used in the central pane.
- if ( this._.pageCount === 0 )
- this.parts.dialog.addClass( 'cke_single_page' );
- else
- this.parts.dialog.removeClass( 'cke_single_page' );
-
// Take records for the tabs and elements created.
this._.tabs[ contents.id ] = [ tab, page ];
this._.tabIdList.push( contents.id );
- this._.pageCount++;
+ !contents.hidden && this._.pageCount++;
this._.lastTab = tab;
+ this.updateStyle();
var contentMap = this._.contents[ contents.id ] = {},
@@ -962,4 +955,11 @@
},
+ // Dialog state-specific style updates.
+ updateStyle : function()
+ {
+ // If only a single page shown, a different style is used in the central pane.
+ this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' );
+ },
+
/**
* Hides a page's tab away from the dialog.
@@ -971,7 +971,13 @@
{
var tab = this._.tabs[id] && this._.tabs[id][0];
- if ( !tab )
+ if ( !tab || this._.pageCount == 1 )
return;
+ // Switch to other tab first when we're hiding the active tab.
+ else if ( id == this._.currentTabId )
+ this.selectPage( getPreviousVisibleTab.call( this ) );
+
tab.hide();
+ this._.pageCount--;
+ this.updateStyle();
},
@@ -988,4 +994,6 @@
return;
tab.show();
+ this._.pageCount++;
+ this.updateStyle();
},
@@ -1270,9 +1278,12 @@
var defaultDialogDefinition =
{
- resizable : CKEDITOR.DIALOG_RESIZE_NONE,
+ resizable : CKEDITOR.DIALOG_RESIZE_BOTH,
minWidth : 600,
minHeight : 400,
buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ]
};
+
+ // The buttons in MacOS Apps are in reverse order #4750
+ CKEDITOR.env.mac && defaultDialogDefinition.buttons.reverse();
// Tool function used to return an item from an array based on its id
@@ -2785,8 +2796,9 @@
openDialog : function( dialogName, callback )
{
- var dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];
+ var dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ],
+ dialogSkin = this.skin.dialog;
// If the dialogDefinition is already loaded, open it immediately.
- if ( typeof dialogDefinitions == 'function' )
+ if ( typeof dialogDefinitions == 'function' && dialogSkin._isLoaded )
{
var storedDialogs = this._.storedDialogs ||
@@ -2810,12 +2822,29 @@
body.setStyle( 'cursor', 'wait' );
- CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), function()
- {
- // In case of plugin error, mark it as loading failed.
- if ( typeof CKEDITOR.dialog._.dialogDefinitions[ dialogName ] != 'function' )
- CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed';
- me.openDialog( dialogName, callback );
- body.setStyle( 'cursor', cursor );
- } );
+
+ function onDialogFileLoaded( success )
+ {
+ var dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ],
+ skin = me.skin.dialog;
+
+ // Check if both skin part and definition is loaded.
+ if ( !skin._isLoaded || loadDefinition && typeof success == 'undefined' )
+ return;
+
+ // In case of plugin error, mark it as loading failed.
+ if ( typeof dialogDefinition != 'function' )
+ CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed';
+
+ me.openDialog( dialogName, callback );
+ body.setStyle( 'cursor', cursor );
+ }
+
+ if ( typeof dialogDefinitions == 'string' )
+ {
+ var loadDefinition = 1;
+ CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), onDialogFileLoaded );
+ }
+
+ CKEDITOR.skins.load( this, 'dialog', onDialogFileLoaded );
return null;
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/dialogui/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/dialogui/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/div/dialogs/div.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/div/dialogs/div.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/div/dialogs/div.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -437,44 +437,36 @@
// Preparing for the 'elementStyle' field.
var dialog = this,
- stylesField = this.getContentElement( 'info', 'elementStyle' ),
- // Reuse the 'stylescombo' plugin's styles definition.
- customStylesConfig = editor.config.stylesCombo_stylesSet,
- stylesSetName = customStylesConfig && customStylesConfig.split( ':' )[ 0 ];
-
- if ( stylesSetName )
- {
- CKEDITOR.stylesSet.load( stylesSetName,
- function( stylesSet )
+ stylesField = this.getContentElement( 'info', 'elementStyle' );
+
+ // Reuse the 'stylescombo' plugin's styles definition.
+ editor.getStylesSet( function( stylesDefinitions )
+ {
+ var styleName;
+
+ if ( stylesDefinitions )
+ {
+ // Digg only those styles that apply to 'div'.
+ for ( var i = 0 ; i < stylesDefinitions.length ; i++ )
{
- var stylesDefinitions = stylesSet[ stylesSetName ],
- styleName;
-
- if ( stylesDefinitions )
- {
- // Digg only those styles that apply to 'div'.
- for ( var i = 0 ; i < stylesDefinitions.length ; i++ )
- {
- var styleDefinition = stylesDefinitions[ i ];
- if ( styleDefinition.element && styleDefinition.element == 'div' )
- {
- styleName = styleDefinition.name;
- styles[ styleName ] = new CKEDITOR.style( styleDefinition );
-
- // Populate the styles field options with style name.
- stylesField.items.push( [ styleName, styleName ] );
- stylesField.add( styleName, styleName );
- }
- }
+ var styleDefinition = stylesDefinitions[ i ];
+ if ( styleDefinition.element && styleDefinition.element == 'div' )
+ {
+ styleName = styleDefinition.name;
+ styles[ styleName ] = new CKEDITOR.style( styleDefinition );
+
+ // Populate the styles field options with style name.
+ stylesField.items.push( [ styleName, styleName ] );
+ stylesField.add( styleName, styleName );
}
-
-
- // We should disable the content element
- // it if no options are available at all.
- stylesField[ stylesField.items.length > 1 ? 'enable' : 'disable' ]();
-
- // Now setup the field value manually.
- setTimeout( function() { stylesField.setup( dialog._element ); }, 0 );
- } );
- }
+ }
+ }
+
+ // We should disable the content element
+ // it if no options are available at all.
+ stylesField[ stylesField.items.length > 1 ? 'enable' : 'disable' ]();
+
+ // Now setup the field value manually.
+ setTimeout( function() { stylesField.setup( dialog._element ); }, 0 );
+ } );
},
onShow : function()
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/div/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/div/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/div/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/domiterator/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/domiterator/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/domiterator/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/elementspath/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/elementspath/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/elementspath/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -57,4 +57,6 @@
});
+ var filters = editor.config.elementsPath_filters;
+
editor.on( 'selectionChange', function( ev )
{
@@ -69,43 +71,57 @@
while ( element )
{
- var index = elementsList.push( element ) - 1;
- var name;
- if ( element.getAttribute( '_cke_real_element_type' ) )
- name = element.getAttribute( '_cke_real_element_type' );
- else
- name = element.getName();
-
- // Use this variable to add conditional stuff to the
- // HTML (because we are doing it in reverse order... unshift).
- var extra = '';
-
- // Some browsers don't cancel key events in the keydown but in the
- // keypress.
- // TODO: Check if really needed for Gecko+Mac.
- if ( env.opera || ( env.gecko && env.mac ) )
- extra += ' onkeypress="return false;"';
-
- // With Firefox, we need to force the button to redraw, otherwise it
- // will remain in the focus state.
- if ( env.gecko )
- extra += ' onblur="this.style.cssText = this.style.cssText;"';
-
- var label = editor.lang.elementsPath.eleTitle.replace( /%1/, name );
- html.unshift(
- '',
- name,
- '' + label + '',
- '' );
+ var ignore = 0;
+ for ( var i = 0; i < filters.length; i++ )
+ {
+ if ( filters[ i ]( element ) === false )
+ {
+ ignore = 1;
+ break;
+ }
+ }
+
+ if ( !ignore )
+ {
+ var index = elementsList.push( element ) - 1;
+ var name;
+ if ( element.getAttribute( '_cke_real_element_type' ) )
+ name = element.getAttribute( '_cke_real_element_type' );
+ else
+ name = element.getName();
+
+ // Use this variable to add conditional stuff to the
+ // HTML (because we are doing it in reverse order... unshift).
+ var extra = '';
+
+ // Some browsers don't cancel key events in the keydown but in the
+ // keypress.
+ // TODO: Check if really needed for Gecko+Mac.
+ if ( env.opera || ( env.gecko && env.mac ) )
+ extra += ' onkeypress="return false;"';
+
+ // With Firefox, we need to force the button to redraw, otherwise it
+ // will remain in the focus state.
+ if ( env.gecko )
+ extra += ' onblur="this.style.cssText = this.style.cssText;"';
+
+ var label = editor.lang.elementsPath.eleTitle.replace( /%1/, name );
+ html.unshift(
+ '',
+ name,
+ '' + label + '',
+ '' );
+
+ }
if ( name == 'body' )
@@ -188,2 +204,16 @@
}
};
+
+/**
+ * A list of filter functions to determinate whether an element should display in elements path bar.
+ * @type Array Array of functions that optionaly return 'false' to prevent the element from displaying.
+ * @default []
+ * @example
+ * // Prevent elements with attribute 'myAttribute' to appear in elements path.
+ * editor.config.elementsPath_filters.push( function( element )
+ * {
+ * if( element.hasAttribute( 'myAttribute') )
+ * return false;
+ * });
+ */
+CKEDITOR.config.elementsPath_filters = [];
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/enterkey/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/enterkey/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/enterkey/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -27,4 +27,17 @@
var doc = range.document;
+ // Exit the list when we're inside an empty list item block. (#5376)
+ if ( range.checkStartOfBlock() && range.checkEndOfBlock() )
+ {
+ var path = new CKEDITOR.dom.elementPath( range.startContainer ),
+ block = path.block;
+
+ if ( block.is( 'li' ) || block.getParent().is( 'li' ) )
+ {
+ editor.execCommand( 'outdent' );
+ return;
+ }
+ }
+
// Determine the block element to be used.
var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
@@ -81,11 +94,4 @@
else
{
-
- if ( isStartOfBlock && isEndOfBlock && previousBlock.is( 'li' ) )
- {
- editor.execCommand( 'outdent' );
- return;
- }
-
var newBlock;
@@ -220,5 +226,6 @@
isPre = ( startBlockTag == 'pre' );
- if ( isPre )
+ // Gecko prefers
as line-break inside (#4711).
+ if ( isPre && !CKEDITOR.env.gecko )
lineBreak = doc.createText( CKEDITOR.env.ie ? '\r' : '\n' );
else
@@ -291,4 +298,6 @@
function enter( editor, mode, forceMode )
{
+ forceMode = editor.config.forceEnterMode || forceMode;
+
// Only effective within document.
if ( editor.mode != 'wysiwyg' )
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/entities/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/entities/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/entities/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/fakeobjects/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/fakeobjects/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/fakeobjects/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/filebrowser/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/filebrowser/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/filebrowser/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -379,20 +379,20 @@
{
editor._.filebrowserFn = CKEDITOR.tools.addFunction( setUrl, editor );
-
- CKEDITOR.on( 'dialogDefinition', function( evt )
- {
- var definition = evt.data.definition,
- element;
- // Associate filebrowser to elements with 'filebrowser' attribute.
- for ( var i in definition.contents )
- {
- element = definition.contents[ i ] ;
- attachFileBrowser( evt.editor, evt.data.name, definition, element.elements );
- if ( element.hidden && element.filebrowser )
- {
- element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser );
- }
- }
- } );
+ }
+ } );
+
+ CKEDITOR.on( 'dialogDefinition', function( evt )
+ {
+ var definition = evt.data.definition,
+ element;
+ // Associate filebrowser to elements with 'filebrowser' attribute.
+ for ( var i in definition.contents )
+ {
+ element = definition.contents[ i ] ;
+ attachFileBrowser( evt.editor, evt.data.name, definition, element.elements );
+ if ( element.hidden && element.filebrowser )
+ {
+ element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser );
+ }
}
} );
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/find/dialogs/find.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/find/dialogs/find.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/find/dialogs/find.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -6,5 +6,5 @@
(function()
{
- function guardDomWalkerNonEmptyTextNode( node )
+ function nonEmptyText( node )
{
return ( node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 );
@@ -14,9 +14,8 @@
* Elements which break characters been considered as sequence.
*/
- function checkCharactersBoundary ( node )
+ function nonCharactersBoundary ( node )
{
- var dtd = CKEDITOR.dtd;
- return node.isBlockBoundary(
- CKEDITOR.tools.extend( {}, dtd.$empty, dtd.$nonEditable ) );
+ return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary(
+ CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable ) ) );
}
@@ -68,6 +67,9 @@
var findDialog = function( editor, startupPage )
{
- // Style object for highlights.
- var highlightStyle = new CKEDITOR.style( editor.config.find_highlight );
+ // Style object for highlights: (#5018)
+ // 1. Defined as full match style to avoid compromising ordinary text color styles.
+ // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually.
+ var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { fullMatch : true, childRule : function(){ return false; } },
+ editor.config.find_highlight ) );
/**
@@ -82,6 +84,6 @@
var walker =
new CKEDITOR.dom.walker( range );
- walker[ matchWord ? 'guard' : 'evaluator' ] =
- guardDomWalkerNonEmptyTextNode;
+ walker.guard = matchWord ? nonCharactersBoundary : null;
+ walker[ 'evaluator' ] = nonEmptyText;
walker.breakOnFalse = true;
@@ -144,5 +146,5 @@
// Marking as match character boundaries.
if ( !currentTextNode
- && checkCharactersBoundary( this._.walker.current ) )
+ && !nonCharactersBoundary( this._.walker.current ) )
this._.matchBoundary = true;
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/find/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/find/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/find/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/flash/dialogs/flash.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/flash/dialogs/flash.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/flash/dialogs/flash.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -266,10 +266,13 @@
}
- // Apply or remove flash parameters.
- var extraStyles = {};
- this.commitContent( objectNode, embedNode, paramMap, extraStyles );
+ // A subset of the specified attributes/styles
+ // should also be applied on the fake element to
+ // have better visual effect. (#5240)
+ var extraStyles = {}, extraAttributes = {};
+ this.commitContent( objectNode, embedNode, paramMap, extraStyles, extraAttributes );
// Refresh the fake image.
var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true );
+ newFakeImage.setAttributes( extraAttributes );
newFakeImage.setStyles( extraStyles );
if ( this.fakeImage )
@@ -573,5 +576,10 @@
],
setup : loadValue,
- commit : commitValue
+ commit : function( objectNode, embedNode, paramMap, extraStyles, extraAttributes )
+ {
+ var value = this.getValue();
+ commitValue.apply( this, arguments );
+ value && ( extraAttributes.align = value );
+ }
},
{
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/flash/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/flash/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/flash/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/floatpanel/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/floatpanel/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/floatpanel/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/font/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/font/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/font/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -30,4 +30,5 @@
styles[ name ] = new CKEDITOR.style( styleDefinition, vars );
+ styles[ name ]._.definition.name = name;
}
else
@@ -56,5 +57,5 @@
// Add the tag entry to the panel list.
- this.add( name, '' + name + '', name );
+ this.add( name, styles[ name ].buildPreview(), name );
}
},
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/format/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/format/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/format/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/button.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/button.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/button.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/checkbox.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/checkbox.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/checkbox.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -92,5 +92,17 @@
element.setAttribute( 'value', value );
else
- element.removeAttribute( 'value' );
+ {
+ if ( CKEDITOR.env.ie )
+ {
+ // Remove attribute 'value' of checkbox #4721.
+ var checkbox = new CKEDITOR.dom.element( 'input' );
+ element.copyAttributes( checkbox, { value: 1 } );
+ checkbox.replace( element );
+ editor.getSelection().selectElement( checkbox );
+ data.element = checkbox;
+ }
+ else
+ element.removeAttribute( 'value' );
+ }
}
},
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/form.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/form.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/form.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/hiddenfield.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/hiddenfield.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/hiddenfield.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/radio.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/radio.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/radio.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/select.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/select.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/select.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/textarea.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/textarea.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/textarea.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/textfield.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/textfield.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/dialogs/textfield.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/forms/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/forms/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/forms/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/horizontalrule/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/horizontalrule/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/horizontalrule/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/htmldataprocessor/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/htmldataprocessor/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/htmldataprocessor/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -42,5 +42,10 @@
{
var lastChild = lastNoneSpaceChild( block );
- return !lastChild || lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br';
+
+ return !lastChild
+ || lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br'
+ // Some of the controls in form needs extension too,
+ // to move cursor at the end of the form. (#4791)
+ || block.name == 'form' && lastChild.name == 'input';
}
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/htmlwriter/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/htmlwriter/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/htmlwriter/plugin.js (revision 5332)
@@ -176,6 +176,6 @@
{
this.forceSimpleAmpersand && ( attValue = attValue.replace( /&/g, '&' ) );
- // Browsers don't always escape quote in attribute values. (#4683)
- attValue = attValue.replace( /"/g, '"' );
+ // Browsers don't always escape special character in attribute values. (#4683, #4719).
+ attValue = CKEDITOR.tools.htmlEncodeAttr( attValue );
}
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/iframedialog/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/iframedialog/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/iframedialog/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/image/dialogs/image.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/image/dialogs/image.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/image/dialogs/image.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -1052,10 +1052,12 @@
html : '' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'
'+
'
'+
- '
'+
+ '
'+
''+
- 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. '+
+ '' +
+ ( editor.config.image_previewText ||
+ 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. '+
'Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, '+
- 'nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.' +
- ''+''
+ 'nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.' ) +
+ ' |
'
}
]
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/image/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/image/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/image/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -63,2 +63,12 @@
*/
CKEDITOR.config.image_removeLinkByEmptyURL = true;
+
+/**
+ * Padding text to set off the image in preview area.
+ * @name CKEDITOR.config.image_previewText
+ * @type String
+ * @default "Lorem ipsum dolor..." placehoder text.
+ * @example
+ * config.image_previewText = CKEDITOR.tools.repeat( '___ ', 100 );
+ */
+
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/indent/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/indent/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/indent/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -136,6 +136,12 @@
// Apply indenting or outdenting on the array.
var baseIndent = listArray[ lastItem.getCustomData( 'listarray_index' ) ].indent;
- for ( i = startItem.getCustomData( 'listarray_index' ) ; i <= lastItem.getCustomData( 'listarray_index' ) ; i++ )
- listArray[i].indent += indentOffset;
+ for ( i = startItem.getCustomData( 'listarray_index' ); i <= lastItem.getCustomData( 'listarray_index' ); i++ )
+ {
+ listArray[ i ].indent += indentOffset;
+ // Make sure the newly created sublist get a brand-new element of the same type. (#5372)
+ var listRoot = listArray[ i ].parent;
+ listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() );
+ }
+
for ( i = lastItem.getCustomData( 'listarray_index' ) + 1 ;
i < listArray.length && listArray[i].indent > baseIndent ; i++ )
@@ -226,5 +232,5 @@
block.$.className = className;
else
- block.addClass( editor.config.indentClasses[ indentStep - 1 ] );
+ block.$.className = CKEDITOR.tools.ltrim( className + ' ' + editor.config.indentClasses[ indentStep - 1 ] );
}
else
@@ -256,4 +262,5 @@
else
this.indentCssProperty = editor.config.contentsLangDirection == 'ltr' ? 'margin-left' : 'margin-right';
+ this.startDisabled = name == 'outdent';
}
@@ -326,4 +333,29 @@
* Size of each indentation step
* @type Number
+ * @example
+ * config.indentOffset = 40;
+ */
+
+ /**
+ * Unit for the indentation style
+ * @type String
+ * @example
+ * config.indentUnit = 'px';
+ */
+
+ /**
+ * List of classes to use for indenting the contents.
+ * @type Array
+ * @example
+ * // Don't use classes for indenting. (this is the default value)
+ * config.indentClasses = null;
+ * @example
+ * // Use the classes 'Indent1', 'Indent2', 'Indent3'
+ * config.indentClasses = ['Indent1', 'Indent2', 'Indent3'];
+ */
+
+/**
+ * Size of each indentation step
+ * @type Number
* @default 40
* @example
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/justify/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/justify/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/justify/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/keystrokes/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/keystrokes/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/keystrokes/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/anchor.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/anchor.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/anchor.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/link.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/link.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/link/dialogs/link.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -6,4 +6,5 @@
CKEDITOR.dialog.add( 'link', function( editor )
{
+ var plugin = CKEDITOR.plugins.link;
// Handles the event when the "Target" selection box is changed.
var targetChanged = function()
@@ -94,5 +95,5 @@
var parseLink = function( editor, element )
{
- var href = element ? ( element.getAttribute( '_cke_saved_href' ) || element.getAttribute( 'href' ) ) : '',
+ var href = ( element && ( element.getAttribute( '_cke_saved_href' ) || element.getAttribute( 'href' ) ) ) || '',
javascriptMatch,
emailMatch,
@@ -418,5 +419,5 @@
[ 'ftp://' ],
[ 'news://' ],
- [ '
', '' ]
+ [ editor.lang.link.other , '' ]
],
setup : function( data )
@@ -448,5 +449,5 @@
url = this.getValue(),
urlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi,
- urlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi;
+ urlOnChangeTestOther = /^((javascript:)|[#\/\.\?])/gi;
var protocol = urlOnChangeProtocol.exec( url );
@@ -782,5 +783,5 @@
data.target = {};
- data.target.name = this.getValue();
+ data.target.name = this.getValue().replace(/\W/gi, '');
}
}
@@ -1137,28 +1138,19 @@
var editor = this.getParentEditor(),
selection = editor.getSelection(),
- ranges = selection.getRanges(),
- element = null,
- me = this;
+ element = null;
+
// Fill in all the relevant fields if there's already one link selected.
- if ( ranges.length == 1 )
- {
-
- var rangeRoot = ranges[0].getCommonAncestor( true );
- element = rangeRoot.getAscendant( 'a', true );
- if ( element && element.getAttribute( 'href' ) )
- {
- selection.selectElement( element );
- }
- else if ( ( element = rangeRoot.getAscendant( 'img', true ) ) &&
- element.getAttribute( '_cke_real_element_type' ) &&
- element.getAttribute( '_cke_real_element_type' ) == 'anchor' )
- {
- this.fakeObj = element;
- element = editor.restoreRealElement( this.fakeObj );
- selection.selectElement( this.fakeObj );
- }
- else
- element = null;
- }
+ if ( ( element = plugin.getSelectedLink( editor ) ) && element.hasAttribute( 'href' ) )
+ selection.selectElement( element );
+ else if ( ( element = selection.getSelectedElement() ) && element.is( 'img' )
+ && element.getAttribute( '_cke_real_element_type' )
+ && element.getAttribute( '_cke_real_element_type' ) == 'anchor' )
+ {
+ this.fakeObj = element;
+ element = editor.restoreRealElement( this.fakeObj );
+ selection.selectElement( this.fakeObj );
+ }
+ else
+ element = null;
this.setupContent( parseLink.apply( this, [ editor, element ] ) );
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/link/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/link/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/link/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -108,5 +108,5 @@
if ( !isAnchor )
{
- if ( !( element = element.getAscendant( 'a', true ) ) )
+ if ( !( element = CKEDITOR.plugins.link.getSelectedLink( editor ) ) )
return null;
@@ -147,4 +147,33 @@
requires : [ 'fakeobjects' ]
} );
+
+CKEDITOR.plugins.link =
+{
+ /**
+ * Get the surrounding link element of current selection.
+ * @param editor
+ * @example CKEDITOR.plugins.link.getSelectedLink( editor );
+ * @since 3.2.1
+ * The following selection will all return the link element.
+ *
+ * li^nk
+ * [link]
+ * text[link]
+ * li[nk]
+ * [li]nk]
+ * [li]nk
+ *
+ */
+ getSelectedLink : function( editor )
+ {
+ var range;
+ try { range = editor.getSelection().getRanges()[ 0 ]; }
+ catch( e ) { return null; }
+
+ range.shrink( CKEDITOR.SHRINK_TEXT );
+ var root = range.getCommonAncestor();
+ return root.getAscendant( 'a', true );
+ }
+};
CKEDITOR.unlinkCommand = function(){};
@@ -179,5 +208,7 @@
editor.document.$.execCommand( 'unlink', false, null );
selection.selectBookmarks( bookmarks );
- }
+ },
+
+ startDisabled : true
};
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/list/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/list/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/list/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -30,5 +30,5 @@
baseArray = [];
- // Iterate over all list items to get their contents and look for inner lists.
+ // Iterate over all list items to and look for inner lists.
for ( var i = 0, count = listNode.getChildCount() ; i < count ; i++ )
{
@@ -38,5 +38,6 @@
if ( listItem.$.nodeName.toLowerCase() != 'li' )
continue;
- var itemObj = { 'parent' : listNode, indent : baseIndentLevel, contents : [] };
+
+ var itemObj = { 'parent' : listNode, indent : baseIndentLevel, element : listItem };
if ( !grandparentNode )
{
@@ -52,13 +53,10 @@
baseArray.push( itemObj );
- for ( var j = 0, itemChildCount = listItem.getChildCount() ; j < itemChildCount ; j++ )
- {
- var child = listItem.getChild( j );
+ for ( var j = 0, itemChildCount = listItem.getChildCount(), child; j < itemChildCount ; j++ )
+ {
+ child = listItem.getChild( j );
+ // Push inner list items with +1 indentation in the correct order.
if ( child.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ child.getName() ] )
- // Note the recursion here, it pushes inner list items with
- // +1 indentation in the correct order.
CKEDITOR.plugins.list.listToArray( child, database, baseArray, baseIndentLevel + 1, itemObj.grandparent );
- else
- itemObj.contents.push( child );
}
}
@@ -90,7 +88,5 @@
retval.append( rootNode );
}
- currentListItem = rootNode.append( doc.createElement( 'li' ) );
- for ( var i = 0 ; i < item.contents.length ; i++ )
- currentListItem.append( item.contents[i].clone( true, true ) );
+ currentListItem = rootNode.append( item.element );
currentIndex++;
}
@@ -105,7 +101,8 @@
currentListItem;
if ( listNodeNames[ item.grandparent.getName() ] )
- currentListItem = doc.createElement( 'li' );
+ currentListItem = item.element;
else
{
+ // Create completely new blocks here, attributes are dropped.
if ( paragraphMode != CKEDITOR.ENTER_BR && item.grandparent.getName() != 'td' )
currentListItem = doc.createElement( paragraphName );
@@ -114,6 +111,5 @@
}
- for ( i = 0 ; i < item.contents.length ; i++ )
- currentListItem.append( item.contents[i].clone( true, true ) );
+ item.element.moveChildren( currentListItem );
if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/listblock/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/listblock/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/listblock/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -10,7 +10,7 @@
onLoad : function()
{
- CKEDITOR.ui.panel.prototype.addListBlock = function( name, definiton )
+ CKEDITOR.ui.panel.prototype.addListBlock = function( name, definition )
{
- return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(), definiton ) );
+ return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(), definition ) );
};
@@ -196,4 +196,6 @@
this.element.getDocument().getById( itemId + '_option' ).setAttribute( 'aria-selected', true );
this.element.setAttribute( 'aria-activedescendant', itemId + '_option' );
+
+ this.onMark && this.onMark( item );
},
@@ -201,4 +203,5 @@
{
this.element.getDocument().getById( this._.items[ value ] ).removeClass( 'cke_selected' );
+ this.onUnmark && this.onUnmark( this._.items[ value ] );
},
@@ -212,4 +215,6 @@
doc.getById( items[ value ] ).removeClass( 'cke_selected' );
}
+
+ this.onUnmark && this.onUnmark();
},
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/maximize/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/maximize/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/maximize/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/menu/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/menu/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/menu/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/menubutton/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/menubutton/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/menubutton/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -37,4 +37,5 @@
{
menu = _.menu = new CKEDITOR.plugins.contextMenu( editor );
+ menu.definition.panel.attributes[ 'aria-label' ] = editor.lang.common.options;
menu.onHide = CKEDITOR.tools.bind( function()
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/newpage/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/newpage/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/newpage/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/pagebreak/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/pagebreak/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/pagebreak/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/panel/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/panel/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/panel/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -228,4 +228,7 @@
: this._.holder;
+ // Disable context menu for block panel.
+ holder.getParent().getParent().disableContextMenu();
+
if ( current )
{
@@ -244,4 +247,14 @@
this._.onKeyDown = block.onKeyDown && CKEDITOR.tools.bind( block.onKeyDown, block );
+
+ block.onMark = function( item )
+ {
+ holder.setAttribute( 'aria-activedescendant', item.getId() + '_option' );
+ };
+
+ block.onUnmark = function()
+ {
+ holder.removeAttribute( 'aria-activedescendant' );
+ };
block.show();
@@ -279,4 +292,7 @@
CKEDITOR.tools.extend( this, blockDefinition );
+ if ( !this.attributes.title )
+ this.attributes.title = this.attributes[ 'aria-label' ];
+
this.keys = {};
@@ -304,4 +320,6 @@
item.getDocument().getWindow().focus();
item.focus();
+
+ this.onMark && this.onMark( item );
}
},
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/panelbutton/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/panelbutton/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/panelbutton/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/pastefromword/filter/default.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/pastefromword/filter/default.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/pastefromword/filter/default.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/pastefromword/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/pastefromword/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/pastefromword/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/pastetext/dialogs/pastetext.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/pastetext/dialogs/pastetext.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/pastetext/dialogs/pastetext.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/pastetext/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/pastetext/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/pastetext/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/popup/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/popup/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/popup/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/preview/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/preview/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/preview/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/print/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/print/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/print/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/resize/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/resize/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/resize/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -55,4 +55,6 @@
}
} );
+
+ editor.on( 'destroy', function() { CKEDITOR.tools.removeFunction( mouseDownFn ) } );
editor.on( 'themeSpace', function( event )
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/richcombo/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/richcombo/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/richcombo/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -131,5 +131,5 @@
element.focus();
},
- execute : clickFn
+ clickFn : clickFn
};
@@ -162,4 +162,7 @@
});
+ // For clean up
+ instance.keyDownFn = keyDownFn;
+
output.push(
'',
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/save/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/save/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/save/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/scayt/dialogs/options.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/scayt/dialogs/options.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/scayt/dialogs/options.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -214,7 +214,7 @@
// Add buttons titles
- if (userDicActive)
- {
- for ( i in buttons )
+ if ( userDicActive )
+ {
+ for ( i = 0; i < buttons.length; i++ )
{
var button = buttons[ i ];
@@ -226,5 +226,5 @@
// Fill options and dictionary labels.
- if (tags[0] == 1)
+ if ( tags[0] == 1 )
{
for ( i in labels )
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/scayt/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/scayt/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/scayt/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -13,5 +13,6 @@
var commandName = 'scaytcheck',
openPage = '',
- scayt_paused = null;
+ scayt_paused = null,
+ scayt_control_id = null;
// Checks if a value exists in an array
@@ -38,20 +39,31 @@
// Initialise Scayt instance.
var oParams = {};
- oParams.srcNodeRef = editor.document.getWindow().$.frameElement; // Get the iframe.
+ // Get the iframe.
+ oParams.srcNodeRef = editor.document.getWindow().$.frameElement;
// syntax : AppName.AppVersion@AppRevision
oParams.assocApp = "CKEDITOR." + CKEDITOR.version + "@" + CKEDITOR.revision;
oParams.customerid = editor.config.scayt_customerid || "1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2";
- oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds;
- oParams.userDictionaryName = editor.config.scayt_userDictionaryName;
+ oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds || '';
+ oParams.userDictionaryName = editor.config.scayt_userDictionaryName || '';
oParams.sLang = editor.config.scayt_sLang || "en_US";
- if ( CKEDITOR._scaytParams )
- {
- for ( var k in CKEDITOR._scaytParams )
- {
- oParams[ k ] = CKEDITOR._scaytParams[ k ];
+ oParams.onBeforeChange = function()
+ {
+ if ( !editor.checkDirty() )
+ setTimeout( function(){ editor.resetDirty(); } );
+ };
+
+ var scayt_custom_params = window.scayt_custom_params;
+ if ( typeof scayt_custom_params == 'object')
+ {
+ for ( var k in scayt_custom_params )
+ {
+ oParams[ k ] = scayt_custom_params[ k ];
}
}
-
+
+ if ( scayt_control_id )
+ oParams.id = scayt_control_id;
+
var scayt_control = new window.scayt( oParams );
@@ -73,5 +85,5 @@
for (var i = 0,l=4; i
+ * 0 (zero): All suggestions are displayed in the main context menu.
+ * Positive number: The maximum number of suggestions to shown in context
+ * menu. Other entries will be shown in "More Suggestions" sub-menu.
+ * Negative number: No suggestions are shown in the main context menu. All
+ * entries will be listed in the "Suggestions" sub-menu.
+ *
+ * @name CKEDITOR.config.scayt_maxSuggestions
+ * @type Number
+ * @default 5
+ * @example
+ * // Display only three suggestions in the main context menu.
+ * config.scayt_maxSuggestions = 3;
+ * @example
+ * // Do not show the suggestions directly.
+ * config.scayt_maxSuggestions = -1;
+ */
+
+/**
+ * Sets the customer ID for SCAYT. Required for migration from free version
+ * with banner to paid version.
+ * @name CKEDITOR.config.scayt_customerid
+ * @type String
+ * @default ''
+ * @example
+ * // Load SCAYT using my customer ID.
+ * config.scayt_customerid = 'your-encrypted-customer-id';
+ */
+
+/**
+ * Enables/disables the "More Suggestions" sub-menu in the context menu.
+ * The possible values are "on" or "off".
+ * @name CKEDITOR.config.scayt_moreSuggestions
+ * @type String
+ * @default 'on'
+ * @example
+ * // Disables the "More Suggestions" sub-menu.
+ * config.scayt_moreSuggestions = 'off';
+ */
+
+/**
+ * Customizes the display of SCAYT context menu commands ("Add Word", "Ignore"
+ * and "Ignore All"). It must be a string with one or more of the following
+ * words separated by a pipe ("|"):
+ *
+ * - "off": disables all options.
+ * - "all": enables all options.
+ * - "ignore": enables the "Ignore" option.
+ * - "ignoreall": enables the "Ignore All" option.
+ * - "add": enables the "Add Word" option.
+ *
+ * @name CKEDITOR.config.scayt_contextCommands
+ * @type String
+ * @default 'all'
+ * @example
+ * // Show only "Add Word" and "Ignore All" in the context menu.
+ * config.scayt_contextCommands = 'add|ignoreall';
+ */
+
+/**
+ * Sets the default spellchecking language for SCAYT.
+ * @name CKEDITOR.config.scayt_sLang
+ * @type String
+ * @default 'en_US'
+ * @example
+ * // Sets SCAYT to German.
+ * config.scayt_sLang = 'de_DE';
+ */
+
+/**
+ * Sets the visibility of the SCAYT tabs in the settings dialog and toolbar
+ * button. The value must contain a "1" (enabled) or "0" (disabled) number for
+ * each of the following entries, in this precise order, separated by a
+ * comma (","): "Options", "Languages" and "Dictionary".
+ * @name CKEDITOR.config.scayt_uiTabs
+ * @type String
+ * @default '1,1,1'
+ * @example
+ * // Hide the "Languages" tab.
+ * config.scayt_uiTabs = '1,0,1';
+ */
+
+
+/**
+ * Set the URL to SCAYT core. Required to switch to licensed version of SCAYT application.
+ * Further details at http://wiki.spellchecker.net/doku.php?id=3rd:wysiwyg:fckeditor:wscckf3l .
+ * @name CKEDITOR.config.scayt_srcUrl
+ * @type String
+ * @default ''
+ * @example
+ * config.scayt_srcUrl = "http://my-host/spellcheck/lf/scayt/scayt.js";
+ */
+
+/**
+ * Links SCAYT to custom dictionaries. It's a string containing dictionary ids
+ * separared by commas (","). Available only for licensed version.
+ * Further details at http://wiki.spellchecker.net/doku.php?id=custom_dictionary_support .
+ * @name CKEDITOR.config.scayt_customDictionaryIds
+ * @type String
+ * @default ''
+ * @example
+ * config.scayt_customDictionaryIds = '3021,3456,3478"';
+ */
+
+/**
+ * Makes it possible to activate a custom dictionary on SCAYT. The user
+ * dictionary name must be used. Available only for licensed version.
+ * @name CKEDITOR.config.scayt_userDictionaryName
+ * @type String
+ * @default ''
+ * @example
+ * config.scayt_userDictionaryName = 'MyDictionary';
+ */
+
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/selection/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/selection/plugin.js (revision 5332)
@@ -73,4 +73,5 @@
var selectAllCmd =
{
+ modes : { wysiwyg : 1, source : 1 },
exec : function( editor )
{
@@ -81,5 +82,16 @@
break;
case 'source' :
- // TODO
+ // Select the contents of the textarea
+ var textarea = editor.textarea.$ ;
+ if ( CKEDITOR.env.ie )
+ {
+ textarea.createTextRange().execCommand( 'SelectAll' ) ;
+ }
+ else
+ {
+ textarea.selectionStart = 0 ;
+ textarea.selectionEnd = textarea.value.length ;
+ }
+ textarea.focus() ;
}
},
@@ -109,6 +121,11 @@
// possible to restore the selection before click
// events get executed.
- body.on( 'focusin', function()
+ body.on( 'focusin', function( evt )
{
+ // If there are elements with layout they fire this event but
+ // it must be ignored to allow edit its contents #4682
+ if ( evt.data.$.srcElement.nodeName != 'BODY' )
+ return;
+
// If we have saved a range, restore it at this
// point.
@@ -127,5 +144,5 @@
});
- editor.window.on( 'focus', function()
+ body.on( 'focus', function()
{
// Enable selections to be saved.
@@ -135,9 +152,24 @@
});
- body.on( 'beforedeactivate', function()
+ body.on( 'beforedeactivate', function( evt )
{
+ // Ignore this event if it's caused by focus switch between
+ // internal editable control type elements, e.g. layouted paragraph. (#4682)
+ if ( evt.data.$.toElement )
+ return;
+
// Disable selections from being saved.
saveEnabled = false;
});
+
+ // IE before version 8 will leave cursor blinking inside the document after
+ // editor blurred unless we clean up the selection. (#4716)
+ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
+ {
+ doc.getWindow().on( 'blur', function( evt )
+ {
+ editor.document.$.selection.empty();
+ });
+ }
// IE fires the "selectionchange" event when clicking
@@ -709,25 +741,28 @@
return cache.selectedElement;
- var node;
-
- if ( this.getType() == CKEDITOR.SELECTION_ELEMENT )
- {
- var sel = this.getNative();
-
- if ( CKEDITOR.env.ie )
- {
- try
- {
- node = sel.createRange().item(0);
+ var self = this;
+
+ var node = CKEDITOR.tools.tryThese(
+ // Is it native IE control type selection?
+ function()
+ {
+ return self.getNative().createRange().item( 0 );
+ },
+ // Figure it out by checking if there's a single enclosed
+ // node of the range.
+ function()
+ {
+ var range = self.getRanges()[ 0 ];
+ range.shrink( CKEDITOR.SHRINK_ELEMENT );
+
+ var enclosed;
+ if ( range.startContainer.equals( range.endContainer )
+ && ( range.endOffset - range.startOffset ) == 1
+ && styleObjectElements[ ( enclosed = range.startContainer.getChild( range.startOffset ) ).getName() ] )
+ {
+ return enclosed.$;
}
- catch(e) {}
- }
- else
- {
- var range = sel.getRangeAt( 0 );
- node = range.startContainer.childNodes[ range.startOffset ];
- }
- }
-
+ });
+
return cache.selectedElement = ( node ? new CKEDITOR.dom.element( node ) : null );
},
@@ -820,4 +855,8 @@
range.moveToElementText( element.$ );
range.select();
+ }
+ finally
+ {
+ this.document.fire( 'selectionchange' );
}
@@ -1057,4 +1096,5 @@
ieRange.select();
+ this.moveToPosition( dummySpan, CKEDITOR.POSITION_BEFORE_START );
dummySpan.remove();
}
@@ -1065,4 +1105,6 @@
ieRange.select();
}
+
+ this.document.fire( 'selectionchange' );
}
:
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/showblocks/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/showblocks/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/showblocks/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/showborders/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/showborders/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/showborders/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -130,34 +130,31 @@
} );
}
+ }
+ });
- // Table dialog must be aware of it.
- CKEDITOR.on( 'dialogDefinition', function( ev )
- {
- if ( ev.editor != editor )
- return;
+ // Table dialog must be aware of it.
+ CKEDITOR.on( 'dialogDefinition', function( ev )
+ {
+ var dialogName = ev.data.name;
- var dialogName = ev.data.name;
+ if ( dialogName == 'table' || dialogName == 'tableProperties' )
+ {
+ var dialogDefinition = ev.data.definition,
+ infoTab = dialogDefinition.getContents( 'info' ),
+ borderField = infoTab.get( 'txtBorder' ),
+ originalCommit = borderField.commit;
- if ( dialogName == 'table' || dialogName == 'tableProperties' )
+ borderField.commit = CKEDITOR.tools.override( originalCommit, function( org )
+ {
+ return function( data, selectedTable )
{
- var dialogDefinition = ev.data.definition,
- infoTab = dialogDefinition.getContents( 'info' ),
- borderField = infoTab.get( 'txtBorder' ),
- originalCommit = borderField.commit;
+ org.apply( this, arguments );
+ var value = parseInt( this.getValue(), 10 );
+ selectedTable[ ( !value || value <= 0 ) ? 'addClass' : 'removeClass' ]( showBorderClassName );
+ };
+ } );
+ }
+ });
- borderField.commit = CKEDITOR.tools.override( originalCommit, function( org )
- {
- return function( data, selectedTable )
- {
- org.apply( this, arguments );
- var value = parseInt( this.getValue(), 10 );
- selectedTable[ ( !value || value <= 0 ) ? 'addClass' : 'removeClass' ]( showBorderClassName );
- };
- } );
- }
- });
- }
-
- });
} )();
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/smiley/dialogs/smiley.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/smiley/dialogs/smiley.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/smiley/dialogs/smiley.js (revision 5332)
@@ -56,4 +56,5 @@
var keystroke = ev.getKeystroke();
+ var rtl = editor.lang.dir == 'rtl';
switch ( keystroke )
{
@@ -87,5 +88,5 @@
// RIGHT-ARROW
- case 39 :
+ case rtl ? 37 : 39 :
// TAB
case 9 :
@@ -108,5 +109,5 @@
// LEFT-ARROW
- case 37 :
+ case rtl ? 39 : 37 :
// SHIFT + TAB
case CKEDITOR.SHIFT + 9 :
@@ -136,5 +137,5 @@
[
'' +
- '
' + editor.lang.common.options +'',
+ '
' + lang.options +'',
'
', '
' + editor.lang.common.options +'' );
+ html.push( '', '
' + lang.options +'' );
this.getContentElement( 'info', 'charContainer' ).getElement().setHtml( html.join( '' ) );
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/styles/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/styles/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/styles/plugin.js (revision 5332)
@@ -79,5 +79,5 @@
{
var blockElements = { address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 };
- var objectElements = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,ul:1 };
+ var objectElements = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1};
var semicolonFixRegex = /\s*(?:;\s*|$)/;
@@ -128,4 +128,6 @@
: this.type == CKEDITOR.STYLE_BLOCK ?
applyBlockStyle
+ : this.type == CKEDITOR.STYLE_OBJECT ?
+ applyObjectStyle
: null ).call( this, range );
},
@@ -139,4 +141,35 @@
},
+ // Removes any conflicting styles from within the specified range..
+ removeConflictsFromRange : function ( range )
+ {
+ var style = this,
+ overrides = getOverrides( style ),
+ styleCandidates = [],
+ overrideCandidates = [];
+
+ var walker = new CKEDITOR.dom.walker( range );
+ walker.evaluator = function( node )
+ {
+ if ( node.type == CKEDITOR.NODE_ELEMENT )
+ {
+ if ( node.is( style.element ) )
+ styleCandidates.push( node );
+ if ( node.getName() in overrides )
+ overrideCandidates.push( node );
+ }
+ };
+ walker.lastForward();
+
+ // First remove from element any style conflictions.
+ for ( var i = styleCandidates.length - 1 ; i >= 0 ; i-- )
+ removeFromElement( style, styleCandidates[ i ] );
+
+ // Now remove any other element with different name that is
+ // defined to be overriden.
+ for ( i = overrideCandidates.length - 1 ; i >= 0 ; i-- )
+ removeOverrides( overrideCandidates[ i ], overrides[ overrideCandidates[ i ].getName() ] ) ;
+ },
+
applyToObject : function( element )
{
@@ -155,4 +188,5 @@
return this.checkElementRemovable( elementPath.block || elementPath.blockLimit, true );
+ case CKEDITOR.STYLE_OBJECT :
case CKEDITOR.STYLE_INLINE :
@@ -161,8 +195,13 @@
for ( var i = 0, element ; i < elements.length ; i++ )
{
- element = elements[i];
-
- if ( element == elementPath.block || element == elementPath.blockLimit )
+ element = elements[ i ];
+
+ if ( this.type == CKEDITOR.STYLE_INLINE
+ && ( element == elementPath.block || element == elementPath.blockLimit ) )
continue;
+
+ if( this.type == CKEDITOR.STYLE_OBJECT
+ && !( element.getName() in objectElements ) )
+ continue;
if ( this.checkElementRemovable( element, true ) )
@@ -171,4 +210,17 @@
}
return false;
+ },
+
+ checkApplicable : function( elementPath )
+ {
+ switch ( this.type )
+ {
+ case CKEDITOR.STYLE_INLINE :
+ case CKEDITOR.STYLE_BLOCK :
+ return true;
+
+ case CKEDITOR.STYLE_OBJECT :
+ return elementPath.lastElement.getAscendant( this.element, true );
+ }
},
@@ -200,7 +252,7 @@
var elementAttr = element.getAttribute( attName ) || '';
- if ( attribs[ attName ] ==
- ( attName == 'style' ?
- normalizeCssText( elementAttr, false ) : elementAttr ) )
+ if ( attName == 'style' ?
+ compareCssText( attribs[ attName ], normalizeCssText( elementAttr, false ) )
+ : attribs[ attName ] == elementAttr )
{
if ( !fullMatch )
@@ -247,4 +299,37 @@
}
return false;
+ },
+
+ // Builds the preview HTML based on the styles definition.
+ buildPreview : function()
+ {
+ var styleDefinition = this._.definition,
+ html = [],
+ elementName = styleDefinition.element;
+
+ // Avoid
in the preview.
+ if ( elementName == 'bdo' )
+ elementName = 'span';
+
+ html = [ '<', elementName ];
+
+ // Assign all defined attributes.
+ var attribs = styleDefinition.attributes;
+ if ( attribs )
+ {
+ for ( var att in attribs )
+ {
+ html.push( ' ', att, '="', attribs[ att ], '"' );
+ }
+ }
+
+ // Assign the style attribute.
+ var cssStyle = CKEDITOR.style.getStyleText( styleDefinition );
+ if ( cssStyle )
+ html.push( ' style="', cssStyle, '"' );
+
+ html.push( '>', styleDefinition.name, '', elementName, '>' );
+
+ return html.join( '' );
}
};
@@ -261,6 +346,6 @@
// Builds the StyleText.
-
- var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '';
+ var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '',
+ specialStylesText = '';
if ( stylesText.length )
@@ -268,5 +353,14 @@
for ( var style in stylesDef )
- stylesText += ( style + ':' + stylesDef[ style ] ).replace( semicolonFixRegex, ';' );
+ {
+ var styleVal = stylesDef[ style ],
+ text = ( style + ':' + styleVal ).replace( semicolonFixRegex, ';' );
+
+ // Some browsers don't support 'inherit' property value, leave them intact. (#5242)
+ if ( styleVal == 'inherit' )
+ specialStylesText += text;
+ else
+ stylesText += text;
+ }
// Browsers make some changes to the style when applying them. So, here
@@ -275,4 +369,6 @@
stylesText = normalizeCssText( stylesText );
+ stylesText += specialStylesText;
+
// Return it, saving it to the next request.
return ( styleDefinition._ST = stylesText );
@@ -310,4 +406,10 @@
range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
range.trim();
+
+ // Remove all style conflictions within the range,
+ // e.g. style="color:red" is conflicting with style="color:blue".
+ var enlargedBookmark = range.createBookmark();
+ this.removeConflictsFromRange( range );
+ range.moveToBookmark( enlargedBookmark );
// Get the first node to be processed and the last, which concludes the
@@ -350,8 +452,4 @@
var styleRange;
-
- // Indicates that that some useful inline content has been found, so
- // the style should be applied.
- var hasContents;
while ( currentNode )
@@ -425,6 +523,4 @@
applyStyle = true;
- if ( !hasContents )
- hasContents = ( nodeType != CKEDITOR.NODE_TEXT || (/[^\s\ufeff]/).test( currentNode.getText() ) );
}
}
@@ -440,5 +536,5 @@
// Apply the style if we have something to which apply it.
- if ( applyStyle && hasContents && styleRange && !styleRange.collapsed )
+ if ( applyStyle && styleRange && !styleRange.collapsed )
{
// Build the style element, based on the style object definition.
@@ -480,8 +576,4 @@
// Move the contents of the range to the style element.
styleRange.extractContents().appendTo( styleNode );
-
- // Here we do some cleanup, removing all duplicated
- // elements from the style element.
- removeFromInsideElement( this, styleNode );
// Insert it into the range position (it is collapsed after
@@ -511,4 +603,6 @@
marker && marker.remove();
range.moveToBookmark( bookmark );
+ // Minimize the result range to exclude empty text nodes. (#5374)
+ range.shrink( CKEDITOR.SHRINK_TEXT );
}
@@ -675,4 +769,11 @@
}
+ function applyObjectStyle( range )
+ {
+ var root = range.getCommonAncestor( true, true ),
+ element = root.getAscendant( this.element, true );
+ element && setupElement( element, this );
+ }
+
function applyBlockStyle( range )
{
@@ -773,5 +874,5 @@
var pres = [];
- splitedHtml.replace( /([\s\S]*?)<\/pre>/gi, function( match, preContent ){
+ splitedHtml.replace( /([\s\S]*?)<\/pre>/gi, function( match, preContent ){
pres.push( preContent );
} );
@@ -874,59 +975,32 @@
{
var def = style._.definition,
- attributes = def.attributes,
+ attributes = CKEDITOR.tools.extend( {}, def.attributes, getOverrides( style )[ element.getName() ] ),
styles = def.styles,
- overrides = getOverrides( style );
-
- function removeAttrs()
- {
- for ( var attName in attributes )
- {
- // The 'class' element value must match (#1318).
- if ( attName == 'class' && element.getAttribute( attName ) != attributes[ attName ] )
- continue;
- element.removeAttribute( attName );
- }
- }
+ // If the style is only about the element itself, we have to remove the element.
+ removeEmpty = CKEDITOR.tools.isEmpty( attributes ) && CKEDITOR.tools.isEmpty( styles );
// Remove definition attributes/style from the elemnt.
- removeAttrs();
+ for ( var attName in attributes )
+ {
+ // The 'class' element value must match (#1318).
+ if ( ( attName == 'class' || style._.definition.fullMatch )
+ && element.getAttribute( attName ) != normalizeProperty( attName, attributes[ attName ] ) )
+ continue;
+ removeEmpty = element.hasAttribute( attName );
+ element.removeAttribute( attName );
+ }
+
for ( var styleName in styles )
+ {
+ // Full match style insist on having fully equivalence. (#5018)
+ if ( style._.definition.fullMatch
+ && element.getStyle( styleName ) != normalizeProperty( styleName, styles[ styleName ], true ) )
+ continue;
+
+ removeEmpty = removeEmpty || !!element.getStyle( styleName );
element.removeStyle( styleName );
-
- // Now remove override styles on the element.
- attributes = overrides[ element.getName() ];
- if ( attributes )
- removeAttrs();
- removeNoAttribsElement( element );
- }
-
- // Removes a style from inside an element.
- function removeFromInsideElement( style, element )
- {
- var def = style._.definition,
- attribs = def.attributes,
- styles = def.styles,
- overrides = getOverrides( style );
-
- var innerElements = element.getElementsByTag( style.element );
-
- for ( var i = innerElements.count(); --i >= 0 ; )
- removeFromElement( style, innerElements.getItem( i ) );
-
- // Now remove any other element with different name that is
- // defined to be overriden.
- for ( var overrideElement in overrides )
- {
- if ( overrideElement != style.element )
- {
- innerElements = element.getElementsByTag( overrideElement ) ;
- for ( i = innerElements.count() - 1 ; i >= 0 ; i-- )
- {
- var innerElement = innerElements.getItem( i );
- removeOverrides( innerElement, overrides[ overrideElement ] ) ;
- }
- }
- }
-
+ }
+
+ removeEmpty && removeNoAttribsElement( element );
}
@@ -1188,4 +1262,11 @@
}
+ function normalizeProperty( name, value, isStyle )
+ {
+ var temp = new CKEDITOR.dom.element( 'span' );
+ temp [ isStyle ? 'setStyle' : 'setAttribute' ]( name, value );
+ return temp[ isStyle ? 'getStyle' : 'getAttribute' ]( name );
+ }
+
function normalizeCssText( unparsedCssText, nativeNormalize )
{
@@ -1210,4 +1291,36 @@
}
+ // Turn inline style text properties into one hash.
+ function parseStyleText( styleText )
+ {
+ var retval = {};
+ styleText
+ .replace( /"/g, '"' )
+ .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value )
+ {
+ retval[ name ] = value;
+ } );
+ return retval;
+ }
+
+ function compareCssText( source, target )
+ {
+ typeof source == 'string' && ( source = parseStyleText( source ) );
+ typeof target == 'string' && ( target = parseStyleText( target ) );
+ for( var name in source )
+ {
+ // Value 'inherit' is treated as a wildcard,
+ // which will match any value.
+ if ( !( name in target &&
+ ( target[ name ] == source[ name ]
+ || source[ name ] == 'inherit'
+ || target[ name ] == 'inherit' ) ) )
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
function applyStyle( document, remove )
{
@@ -1257,2 +1370,74 @@
CKEDITOR.stylesSet.load( name, callback );
};
+
+
+/**
+ * Gets the current styleSet for this instance
+ * @param {Function} The function to be called with the styles data.
+ * @example
+ * editor.getStylesSet( function( stylesDefinitions ) {} );
+ */
+CKEDITOR.editor.prototype.getStylesSet = function( callback )
+{
+ if ( !this._.stylesDefinitions )
+ {
+ var editor = this,
+ // Respect the backwards compatible definition entry
+ configStyleSet = editor.config.stylesCombo_stylesSet || editor.config.stylesSet || 'default';
+
+ // #5352 Allow to define the styles directly in the config object
+ if ( configStyleSet instanceof Array )
+ {
+ editor._.stylesDefinitions = configStyleSet;
+ callback( configStyleSet );
+ return;
+ }
+
+ var partsStylesSet = configStyleSet.split( ':' ),
+ styleSetName = partsStylesSet[ 0 ],
+ externalPath = partsStylesSet[ 1 ],
+ pluginPath = CKEDITOR.plugins.registered.styles.path;
+
+ CKEDITOR.stylesSet.addExternal( styleSetName,
+ externalPath ?
+ partsStylesSet.slice( 1 ).join( ':' ) :
+ pluginPath + 'styles/' + styleSetName + '.js', '' );
+
+ CKEDITOR.stylesSet.load( styleSetName, function( stylesSet )
+ {
+ editor._.stylesDefinitions = stylesSet[ styleSetName ];
+ callback( editor._.stylesDefinitions );
+ } ) ;
+ }
+ else
+ callback( this._.stylesDefinitions );
+};
+
+/**
+ * The "styles definition set" to use in the editor. They will be used in the
+ * styles combo and the Style selector of the div container.
+ * The styles may be defined in the page containing the editor, or can be
+ * loaded on demand from an external file. In the second case, if this setting
+ * contains only a name, the styles definition file will be loaded from the
+ * "styles" folder inside the styles plugin folder.
+ * Otherwise, this setting has the "name:url" syntax, making it
+ * possible to set the URL from which loading the styles file.
+ * Previously this setting was available as config.stylesCombo_stylesSet
+ * @type String|Array
+ * @default 'default'
+ * @since 3.3
+ * @example
+ * // Load from the styles' styles folder (mystyles.js file).
+ * config.stylesSet = 'mystyles';
+ * @example
+ * // Load from a relative URL.
+ * config.stylesSet = 'mystyles:/editorstyles/styles.js';
+ * @example
+ * // Load from a full URL.
+ * config.stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js';
+ * @example
+ * // Load from a list of definitions.
+ * config.stylesSet = [
+ * { name : 'Strong Emphasis', element : 'strong' },
+ * { name : 'Emphasis', element : 'em' }, ... ];
+ */
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/styles/styles/default.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/styles/styles/default.js (revision 5332)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/styles/styles/default.js (revision 5332)
@@ -0,0 +1,88 @@
+/*
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.stylesSet.add( 'default',
+[
+ /* Block Styles */
+
+ // These styles are already available in the "Format" combo, so they are
+ // not needed here by default. You may enable them to avoid placing the
+ // "Format" combo in the toolbar, maintaining the same features.
+ /*
+ { name : 'Paragraph' , element : 'p' },
+ { name : 'Heading 1' , element : 'h1' },
+ { name : 'Heading 2' , element : 'h2' },
+ { name : 'Heading 3' , element : 'h3' },
+ { name : 'Heading 4' , element : 'h4' },
+ { name : 'Heading 5' , element : 'h5' },
+ { name : 'Heading 6' , element : 'h6' },
+ { name : 'Preformatted Text', element : 'pre' },
+ { name : 'Address' , element : 'address' },
+ */
+
+ { name : 'Blue Title' , element : 'h3', styles : { 'color' : 'Blue' } },
+ { name : 'Red Title' , element : 'h3', styles : { 'color' : 'Red' } },
+
+ /* Inline Styles */
+
+ // These are core styles available as toolbar buttons. You may opt enabling
+ // some of them in the Styles combo, removing them from the toolbar.
+ /*
+ { name : 'Strong' , element : 'strong', overrides : 'b' },
+ { name : 'Emphasis' , element : 'em' , overrides : 'i' },
+ { name : 'Underline' , element : 'u' },
+ { name : 'Strikethrough' , element : 'strike' },
+ { name : 'Subscript' , element : 'sub' },
+ { name : 'Superscript' , element : 'sup' },
+ */
+
+ { name : 'Marker: Yellow' , element : 'span', styles : { 'background-color' : 'Yellow' } },
+ { name : 'Marker: Green' , element : 'span', styles : { 'background-color' : 'Lime' } },
+
+ { name : 'Big' , element : 'big' },
+ { name : 'Small' , element : 'small' },
+ { name : 'Typewriter' , element : 'tt' },
+
+ { name : 'Computer Code' , element : 'code' },
+ { name : 'Keyboard Phrase' , element : 'kbd' },
+ { name : 'Sample Text' , element : 'samp' },
+ { name : 'Variable' , element : 'var' },
+
+ { name : 'Deleted Text' , element : 'del' },
+ { name : 'Inserted Text' , element : 'ins' },
+
+ { name : 'Cited Work' , element : 'cite' },
+ { name : 'Inline Quotation' , element : 'q' },
+
+ { name : 'Language: RTL' , element : 'span', attributes : { 'dir' : 'rtl' } },
+ { name : 'Language: LTR' , element : 'span', attributes : { 'dir' : 'ltr' } },
+
+ /* Object Styles */
+
+ {
+ name : 'Image on Left',
+ element : 'img',
+ attributes :
+ {
+ 'style' : 'padding: 5px; margin-right: 5px',
+ 'border' : '2',
+ 'align' : 'left'
+ }
+ },
+
+ {
+ name : 'Image on Right',
+ element : 'img',
+ attributes :
+ {
+ 'style' : 'padding: 5px; margin-left: 5px',
+ 'border' : '2',
+ 'align' : 'right'
+ }
+ },
+
+ { name : 'Borderless Table', element : 'table', styles: { 'border-style': 'hidden', 'background-color' : '#E6E6FA' } },
+ { name : 'Square Bulleted List', element : 'ul', styles : { 'list-style-type' : 'square' } }
+]);
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/stylescombo/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/stylescombo/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/stylescombo/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -6,6 +6,4 @@
(function()
{
- var stylesManager;
-
CKEDITOR.plugins.add( 'stylescombo',
{
@@ -16,18 +14,36 @@
var config = editor.config,
lang = editor.lang.stylesCombo,
- pluginPath = this.path,
- styles;
-
- if ( !stylesManager )
- stylesManager = CKEDITOR.stylesSet;
-
- var comboStylesSet = config.stylesCombo_stylesSet.split( ':' ),
- styleSetName = comboStylesSet[ 0 ],
- externalPath = comboStylesSet[ 1 ];
-
- stylesManager.addExternal( styleSetName,
- externalPath ?
- comboStylesSet.slice( 1 ).join( ':' ) :
- pluginPath + 'styles/' + styleSetName + '.js', '' );
+ styles = {},
+ stylesList = [];
+
+ function loadStylesSet( callback )
+ {
+ editor.getStylesSet( function( stylesDefinitions )
+ {
+ if ( !stylesList.length )
+ {
+ var style,
+ styleName;
+
+ // Put all styles into an Array.
+ for ( var i = 0 ; i < stylesDefinitions.length ; i++ )
+ {
+ var styleDefinition = stylesDefinitions[ i ];
+
+ styleName = styleDefinition.name;
+
+ style = styles[ styleName ] = new CKEDITOR.style( styleDefinition );
+ style._name = styleName;
+
+ stylesList.push( style );
+ }
+
+ // Sorts the Array, so the styles get grouped by type.
+ stylesList.sort( sortStyles );
+ }
+
+ callback && callback();
+ });
+ }
editor.ui.addRichCombo( 'Styles',
@@ -48,34 +64,12 @@
var combo = this;
- CKEDITOR.stylesSet.load( styleSetName, function( stylesSet )
+ loadStylesSet( function()
{
- var stylesDefinitions = stylesSet[ styleSetName ],
- style,
- styleName,
- stylesList = [];
-
- styles = {};
-
- // Put all styles into an Array.
- for ( var i = 0 ; i < stylesDefinitions.length ; i++ )
- {
- var styleDefinition = stylesDefinitions[ i ];
-
- styleName = styleDefinition.name;
-
- style = styles[ styleName ] = new CKEDITOR.style( styleDefinition );
- style._name = styleName;
-
- stylesList.push( style );
- }
-
- // Sorts the Array, so the styles get grouped
- // by type.
- stylesList.sort( sortStyles );
+ var style, styleName;
// Loop over the Array, adding all items to the
// combo.
var lastType;
- for ( i = 0 ; i < stylesList.length ; i++ )
+ for ( var i = 0 ; i < stylesList.length ; i++ )
{
style = stylesList[ i ];
@@ -92,5 +86,5 @@
combo.add(
styleName,
- style.type == CKEDITOR.STYLE_OBJECT ? styleName : buildPreview( style._.definition ),
+ style.type == CKEDITOR.STYLE_OBJECT ? styleName : style.buildPreview(),
styleName );
}
@@ -109,13 +103,4 @@
var style = styles[ value ],
selection = editor.getSelection();
-
- if ( style.type == CKEDITOR.STYLE_OBJECT )
- {
- var element = selection.getSelectedElement();
- if ( element )
- style.applyToObject( element );
-
- return;
- }
var elementPath = new CKEDITOR.dom.elementPath( selection.getStartElement() );
@@ -164,5 +149,5 @@
onOpen : function()
{
- if ( CKEDITOR.env.ie )
+ if ( CKEDITOR.env.ie || CKEDITOR.env.webkit )
editor.focus();
@@ -170,5 +155,4 @@
var element = selection.getSelectedElement(),
- elementName = element && element.getName(),
elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() );
@@ -181,23 +165,13 @@
type = style.type;
- if ( type == CKEDITOR.STYLE_OBJECT )
+ if ( style.checkActive( elementPath ) )
+ this.mark( name );
+ else if ( type == CKEDITOR.STYLE_OBJECT && !style.checkApplicable( elementPath ) )
{
- if ( element && style.element == elementName )
- {
- if ( style.checkElementRemovable( element, true ) )
- this.mark( name );
-
- counter[ type ]++;
- }
- else
- this.hideItem( name );
+ this.hideItem( name );
+ counter[ type ]--;
}
- else
- {
- if ( style.checkActive( elementPath ) )
- this.mark( name );
-
- counter[ type ]++;
- }
+
+ counter[ type ]++;
}
@@ -212,38 +186,8 @@
}
});
+
+ editor.on( 'instanceReady', function() { loadStylesSet(); } );
}
});
-
- function buildPreview( styleDefinition )
- {
- var html = [];
-
- var elementName = styleDefinition.element;
-
- // Avoid in the preview.
- if ( elementName == 'bdo' )
- elementName = 'span';
-
- html = [ '<', elementName ];
-
- // Assign all defined attributes.
- var attribs = styleDefinition.attributes;
- if ( attribs )
- {
- for ( var att in attribs )
- {
- html.push( ' ', att, '="', attribs[ att ], '"' );
- }
- }
-
- // Assign the style attribute.
- var cssStyle = CKEDITOR.style.getStyleText( styleDefinition );
- if ( cssStyle )
- html.push( ' style="', cssStyle, '"' );
-
- html.push( '>', styleDefinition.name, '', elementName, '>' );
-
- return html.join( '' );
- }
function sortStyles( styleA, styleB )
@@ -259,24 +203,2 @@
}
})();
-
-/**
- * The "styles definition set" to load into the styles combo. The styles may
- * be defined in the page containing the editor, or can be loaded on demand
- * from an external file when opening the styles combo for the fist time. In
- * the second case, if this setting contains only a name, the styles definition
- * file will be loaded from the "styles" folder inside the stylescombo plugin
- * folder. Otherwise, this setting has the "name:url" syntax, making it
- * possible to set the URL from which loading the styles file.
- * @type string
- * @default 'default'
- * @example
- * // Load from the stylescombo styles folder (mystyles.js file).
- * config.stylesCombo_stylesSet = 'mystyles';
- * @example
- * // Load from a relative URL.
- * config.stylesCombo_stylesSet = 'mystyles:/editorstyles/styles.js';
- * @example
- * // Load from a full URL.
- * config.stylesCombo_stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js';
- */
-CKEDITOR.config.stylesCombo_stylesSet = 'default';
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/table/dialogs/table.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/table/dialogs/table.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/table/dialogs/table.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -569,4 +569,6 @@
if ( this.getValue() )
selectedTable.setAttribute( 'summary', this.getValue() );
+ else
+ selectedTable.removeAttribute( 'summary' );
}
}
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/table/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/table/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/table/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/tabletools/dialogs/tableCell.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/tabletools/dialogs/tableCell.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/tabletools/dialogs/tableCell.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -516,7 +516,12 @@
onOk : function()
{
+ var selection = this._.editor.getSelection(),
+ bookmarks = selection.createBookmarks();
+
var cells = this.cells;
for ( var i = 0 ; i < cells.length ; i++ )
this.commitContent( cells[ i ] );
+
+ selection.selectBookmarks( bookmarks );
}
};
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/tabletools/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/tabletools/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/tabletools/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/templates/dialogs/templates.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/templates/dialogs/templates.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/templates/dialogs/templates.js (revision 5332)
@@ -42,8 +42,8 @@
// Build the inner HTML of our new item DIV.
- var html = '';
+ var html = '';
if ( template.image && imagesPath )
- html += ' | ';
+ html += ' | ';
html += '' + template.title + ' ';
@@ -101,8 +101,8 @@
{
var target = evt.data.getTarget(),
- position = listContainer.getPosition( target );
+ onList = listContainer.equals( target );
// Keyboard navigation for template list.
- if ( position > CKEDITOR.POSITION_CONTAINS )
+ if ( onList || listContainer.contains( target ) )
{
var keystroke = evt.data.getKeystroke(),
@@ -112,17 +112,23 @@
if ( items )
{
- switch ( keystroke )
- {
- case 40 : // ARROW-DOWN
- focusItem = target.getNext();
- break;
-
- case 38 : // ARROW-UP
- focusItem = target.getPrevious();
- break;
-
- case 13 : // ENTER
- case 32 : // SPACE
- target.fire( 'click' );
+ // Focus not yet onto list items?
+ if ( onList )
+ focusItem = items.getItem( 0 );
+ else
+ {
+ switch ( keystroke )
+ {
+ case 40 : // ARROW-DOWN
+ focusItem = target.getNext();
+ break;
+
+ case 38 : // ARROW-UP
+ focusItem = target.getPrevious();
+ break;
+
+ case 13 : // ENTER
+ case 32 : // SPACE
+ target.fire( 'click' );
+ }
}
@@ -169,15 +175,10 @@
id : "templatesList",
type : 'html',
- focus: function()
- {
- // Move focus to the first list item if available.
- try { this.getElement().getElementsByTag( 'a' ).getItem( 0 ).focus(); }
- catch( er ){}
- },
+ focus: true,
html :
'' +
- '' + editor.lang.common.options+ ''
+ '' + editor.lang.templates.options+ ''
},
{
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/templates/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/templates/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/templates/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/templates/templates/default.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/templates/templates/default.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/templates/templates/default.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -65,5 +65,5 @@
'Title goes here' +
'' +
- '' +
+ '' +
'' +
'Table title' +
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/toolbar/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/toolbar/plugin.js (revision 5332)
@@ -61,12 +61,13 @@
{
var next, nextToolGroup, groupItemsCount;
+ var rtl = editor.lang.dir == 'rtl';
switch ( keystroke )
{
- case 39 : // RIGHT-ARROW
+ case rtl ? 37 : 39 : // RIGHT-ARROW
case 9 : // TAB
do
{
- // Look for the previous item in the toolbar.
+ // Look for the next item in the toolbar.
next = item.next;
@@ -100,5 +101,5 @@
return false;
- case 37 : // LEFT-ARROW
+ case rtl ? 39 : 37 : // LEFT-ARROW
case CKEDITOR.SHIFT + 9 : // SHIFT + TAB
do
@@ -285,4 +286,8 @@
} );
+ editor.on( 'destroy', function () {
+ CKEDITOR.tools.removeFunction( collapserFn );
+ } );
+
var collapserId = 'cke_' + CKEDITOR.tools.getNextNumber();
@@ -409,5 +414,5 @@
* '/',
* ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
- * ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
+ * ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
* ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
* ['Link','Unlink','Anchor'],
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/dialogs/uicolor.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/dialogs/uicolor.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/dialogs/uicolor.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/lang/en.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/lang/en.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/lang/en.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/yui/yui.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/yui/yui.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/uicolor/yui/yui.js (revision 5332)
@@ -1,3 +1,3 @@
-/*jsl:ignoreall*/
+/*jsl:ignoreall*/
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/undo/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/undo/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/undo/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/wsc/dialogs/wsc.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/wsc/dialogs/wsc.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/wsc/dialogs/wsc.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/wsc/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/wsc/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/wsc/plugin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/plugins/wysiwygarea/plugin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/plugins/wysiwygarea/plugin.js (revision 5332)
@@ -162,4 +162,15 @@
}
+ function restoreSelection( selection )
+ {
+ if ( selection.isLocked )
+ {
+ selection.unlock();
+ setTimeout( function() { selection.lock(); }, 0 );
+ }
+ }
+
+ var isNotWhitespace = CKEDITOR.dom.walker.whitespaces( true );
+
/**
* Auto-fixing block-less content by wrapping paragraph (#3190), prevent
@@ -184,4 +195,6 @@
{
restoreDirty( editor );
+ CKEDITOR.env.ie && restoreSelection( selection );
+
var fixedBlock = range.fixBlock( true,
editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
@@ -200,5 +213,4 @@
var previousElement = fixedBlock.getPrevious( isNotWhitespace ),
nextElement = fixedBlock.getNext( isNotWhitespace );
-
if ( previousElement && previousElement.getName
@@ -212,5 +224,5 @@
}
}
-
+
range.select();
// Notify non-IE that selection has changed.
@@ -222,12 +234,29 @@
// blocks (e.g. table, list, pre) at the end of document, make this happen by
// place a bogus node there, which would be later removed by dataprocessor.
- var lastNode = body.getLast( CKEDITOR.dom.walker.whitespaces( true ) );
- if ( lastNode && lastNode.getName && ( lastNode.getName() in nonExitableElementNames ) )
+ var walkerRange = new CKEDITOR.dom.range( editor.document ),
+ walker = new CKEDITOR.dom.walker( walkerRange );
+ walkerRange.selectNodeContents( body );
+ walker.evaluator = function( node )
+ {
+ return node.type == CKEDITOR.NODE_ELEMENT && ( node.getName() in nonExitableElementNames );
+ };
+ walker.guard = function( node, isMoveout )
+ {
+ return !( ( node.type == CKEDITOR.NODE_TEXT && isNotWhitespace( node ) ) || isMoveout );
+ };
+
+ if ( walker.previous() )
{
restoreDirty( editor );
+ CKEDITOR.env.ie && restoreSelection( selection );
+
+ var paddingBlock;
+ if ( enterMode != CKEDITOR.ENTER_BR )
+ paddingBlock = body.append( new CKEDITOR.dom.element( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) );
+ else
+ paddingBlock = body;
+
if ( !CKEDITOR.env.ie )
- body.appendBogus();
- else
- body.append( editor.document.createText( '\xa0' ) );
+ paddingBlock.appendBogus();
}
}
@@ -278,9 +307,5 @@
( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) +
- // With FF, it's better to load the data on
- // iframe.load. (#3894,#4058)
- // But in FF, we still need the open()-close() call
- // to avoid HTTPS warnings.
- ( CKEDITOR.env.gecko ? '' : ( 'parent.CKEDITOR.tools.callFunction(' + setDataFn + ',document);' ) ) +
+ ( ( 'parent.CKEDITOR.tools.callFunction(' + setDataFn + ',document);' ) ) +
'document.close();';
@@ -289,6 +314,9 @@
' style="width:100%;height:100%"' +
' frameBorder="0"' +
- ' src="javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())"' +
- ' tabIndex="' + editor.tabIndex + '"' +
+ ' title="' + frameLabel + '"' +
+ // With FF, the 'src' attribute should be left empty to
+ // trigger iframe's 'load' event.
+ ' src="' + ( CKEDITOR.env.gecko ? '' : 'javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())' ) + '"' +
+ ' tabIndex="' + editor.tabIndex + '"' +
' allowTransparency="true"' +
'>' );
@@ -426,4 +454,5 @@
&& first.hasAttribute( '_moz_editor_bogus_node' ) )
{
+ restoreDirty( editor );
var keyEventSimulate = domDocument.$.createEvent( "KeyEvents" );
keyEventSimulate.initKeyEvent( 'keypress', true, true, domWindow.$, false,
@@ -652,4 +681,7 @@
CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
+
+ // The iframe is recreated on each call of setData, so we need to clear DOM objects
+ this.onDispose();
createIFrame( data );
},
@@ -689,6 +721,22 @@
},
+ onDispose : function()
+ {
+ if ( !editor.document )
+ return;
+
+ editor.document.getDocumentElement().clearCustomData();
+ editor.document.getBody().clearCustomData();
+
+ editor.window.clearCustomData();
+ editor.document.clearCustomData();
+
+ iframe.clearCustomData();
+ },
+
unload : function( holderElement )
{
+ this.onDispose();
+
editor.window = editor.document = iframe = mainElement = isPendingFocus = null;
@@ -703,23 +751,4 @@
{
editor.window.focus();
-
- // Force the selection to happen, in this way
- // we guarantee the focus will be there. (#4848)
- if ( CKEDITOR.env.ie )
- {
- try
- {
- var sel = editor.getSelection();
- sel = sel && sel.getNative();
- var range = sel && sel.type && sel.createRange();
- if ( range )
- {
- sel.empty();
- range.select();
- }
- }
- catch (e) {}
- }
-
editor.selectionChange();
}
@@ -758,4 +787,8 @@
editor.focus();
} );
+ } );
+ editor.on( 'destroy', function()
+ {
+ ieFocusGrabber.clearCustomData();
} );
}
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/dialog.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/dialog.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/dialog.css (revision 5332)
@@ -323,4 +323,5 @@
_background: none;
padding: 5px 0;
+ text-align: center;
}
@@ -432,4 +433,6 @@
display: inline-block;
cursor: default;
+ min-width: 60px;
+ +margin: 2px 0; /* IE7 */
}
@@ -685,5 +688,4 @@
.cke_skin_kama .cke_dialog #ImagePreviewBox
{
- white-space : normal;
border : 2px ridge black;
overflow : scroll;
@@ -693,4 +695,15 @@
background-color : white;
}
+
+.cke_skin_kama .cke_dialog #ImagePreviewBox table td {
+ white-space: normal;
+}
+
+/* Fix iframedialog's height doesn't stretch to 100% #4863.*/
+.cke_skin_kama .cke_browser_iequirks .cke_dialog_page_contents
+{
+ _position: absolute;
+}
+
.cke_skin_kama .cke_dialog #ImagePreviewLoader
{
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/editor.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/editor.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/editor.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/elementspath.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/elementspath.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/elementspath.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/menu.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/menu.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/menu.css (revision 5332)
@@ -32,18 +32,4 @@
{
border: 2px solid;
-}
-
-.cke_skin_kama .cke_menuitem a.cke_disabled:hover,
-.cke_skin_kama .cke_menuitem a.cke_disabled:focus,
-.cke_skin_kama .cke_menuitem a.cke_disabled:active
-{
- background-color: transparent !important;
-}
-
-.cke_hc .cke_menuitem a.cke_disabled:hover,
-.cke_hc .cke_menuitem a.cke_disabled:focus,
-.cke_hc .cke_menuitem a.cke_disabled:active
-{
- border-width: 0px;
}
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/presets.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/presets.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/presets.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/reset.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/reset.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/reset.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/skin.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/skin.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/skin.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/kama/toolbar.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/kama/toolbar.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/kama/toolbar.css (revision 5332)
@@ -23,4 +23,6 @@
{
clear: both;
+ /* Define the padding-bottom otherwise the collapser button will not be clickable #4932*/
+ padding-bottom: 1px;
}
@@ -172,6 +174,6 @@
}
-.cke_skin_kama .cke_button a.cke_disabled,
-.cke_skin_kama .cke_browser_ie a:hover.cke_button .cke_disabled
+.cke_skin_kama .cke_button a.cke_disabled *,
+.cke_skin_kama .cke_browser_ie a:hover.cke_button .cke_disabled *
{
filter: alpha(opacity=30); /* IE */
@@ -179,6 +181,6 @@
}
-.cke_skin_kama .cke_hc .cke_button a.cke_disabled,
-.cke_skin_kama .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled
+.cke_skin_kama .cke_hc .cke_button a.cke_disabled *,
+.cke_skin_kama .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled *
{
filter: alpha(opacity=60);
@@ -198,4 +200,11 @@
}
+.cke_skin_kama .cke_button a:hover,
+.cke_skin_kama .cke_button a:focus,
+.cke_skin_kama .cke_button a:active /* IE */
+{
+ background-color: #dff1ff;
+}
+
.cke_skin_kama .cke_button a:hover.cke_on,
.cke_skin_kama .cke_button a:focus.cke_on,
@@ -205,17 +214,7 @@
}
-.cke_skin_kama .cke_button a:hover.cke_off,
-.cke_skin_kama .cke_button a:focus.cke_off,
-.cke_skin_kama .cke_button a:active.cke_off /* IE */
-{
- background-color: #dff1ff;
-}
-
-.cke_skin_kama .cke_hc .cke_button a:hover.cke_on,
-.cke_skin_kama .cke_hc .cke_button a:focus.cke_on,
-.cke_skin_kama .cke_hc .cke_button a:active.cke_on, /* IE */
-.cke_skin_kama .cke_hc .cke_button a:hover.cke_off,
-.cke_skin_kama .cke_hc .cke_button a:focus.cke_off,
-.cke_skin_kama .cke_hc .cke_button a:active.cke_off /* IE */
+.cke_skin_kama .cke_hc .cke_button a:hover,
+.cke_skin_kama .cke_hc .cke_button a:focus,
+.cke_skin_kama .cke_hc .cke_button a:active /* IE */
{
padding: 0 2px !important;
@@ -295,9 +294,4 @@
}
-.cke_skin_kama .cke_hc .cke_button .cke_buttonarrow
-{
- display: none;
-}
-
/*** Firefox 2 ***/
@@ -414,8 +408,2 @@
padding-bottom: 0;
}
-
-.cke_skin_kama .cke_browser_gecko .cke_toolbox
-{
- /* Define the padding-bottom otherwise the collapser button will not be clicable in FF */
- padding-bottom: 1px;
-}
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/dialog.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/dialog.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/dialog.css (revision 5332)
@@ -613,5 +613,4 @@
.cke_skin_office2003 .cke_dialog #ImagePreviewBox
{
- white-space : normal;
border : 2px ridge black;
overflow : scroll;
@@ -621,4 +620,15 @@
background-color : white;
}
+
+.cke_skin_office2003 .cke_dialog #ImagePreviewBox table td {
+ white-space: normal;
+}
+
+/* Fix iframedialog's height doesn't stretch to 100% #4863.*/
+.cke_skin_office2003 .cke_browser_iequirks .cke_dialog_page_contents
+{
+ _position: absolute;
+}
+
.cke_skin_office2003 .cke_dialog #ImagePreviewLoader
{
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/editor.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/editor.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/editor.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/mainui.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/mainui.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/mainui.css (revision 5332)
@@ -73,4 +73,10 @@
}
+.cke_skin_office2003 .cke_browser_iequirks textarea.cke_source
+{
+ /* For IE6+Quirks only */
+ _white-space: normal;
+}
+
.cke_skin_office2003 .cke_resizer
{
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/menu.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/menu.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/menu.css (revision 5332)
@@ -34,18 +34,4 @@
}
-.cke_skin_office2003 .cke_menuitem a.cke_disabled:hover,
-.cke_skin_office2003 .cke_menuitem a.cke_disabled:focus,
-.cke_skin_office2003 .cke_menuitem a.cke_disabled:active
-{
- background-color: transparent !important;
-}
-
-.cke_hc .cke_menuitem a.cke_disabled:hover,
-.cke_hc .cke_menuitem a.cke_disabled:focus,
-.cke_hc .cke_menuitem a.cke_disabled:active
-{
- border-width: 0px;
-}
-
.cke_skin_office2003 .cke_menuitem .cke_icon
{
@@ -74,4 +60,5 @@
filter: alpha(opacity=70); /* IE */
opacity: 0.70; /* Safari, Opera and Mozilla */
+ clear: both;
}
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/presets.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/presets.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/presets.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/reset.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/reset.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/reset.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/office2003/toolbar.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/office2003/toolbar.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/office2003/toolbar.css (revision 5332)
@@ -16,4 +16,11 @@
{
white-space: normal;
+}
+
+.cke_skin_office2003 .cke_toolbox
+{
+ clear: both;
+ /* Define the padding-bottom otherwise the collapser button will not be clickable #4932*/
+ padding-bottom: 1px;
}
@@ -241,4 +248,5 @@
opacity: 1.0;
filter: alpha(opacity=100);
+ _border: 1px solid transparent;
}
@@ -253,5 +261,7 @@
}
-.cke_skin_office2003 .cke_hc .cke_button a.cke_on
+.cke_skin_office2003 .cke_hc .cke_button a:hover,
+.cke_skin_office2003 .cke_hc .cke_button a:focus,
+.cke_skin_office2003 .cke_hc .cke_button a:active /* IE */
{
padding: 0 2px !important;
@@ -259,20 +269,13 @@
}
-.cke_skin_office2003 .cke_button a.cke_disabled,
-.cke_skin_office2003 .cke_button a:hover.cke_disabled,
-.cke_skin_office2003 .cke_button a:focus.cke_disabled,
-.cke_skin_office2003 .cke_button a:active.cke_disabled
-{
- border: solid 1px transparent;
+.cke_skin_office2003 .cke_button a.cke_disabled *,
+.cke_skin_office2003 .cke_browser_ie a:hover.cke_button .cke_disabled *
+{
filter: alpha(opacity=30); /* IE */
- opacity : 0.3; /* Safari, Opera and Mozilla */
- vertical-align: top;
-
- _border: none;
- _margin: 3px 1px 1px 1px;
-}
-
-.cke_skin_office2003 .cke_hc .cke_button a.cke_disabled,
-.cke_skin_office2003 .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled
+ opacity: 0.3; /* Safari, Opera and Mozilla */
+}
+
+.cke_skin_office2003 .cke_hc .cke_button a.cke_disabled *,
+.cke_skin_office2003 .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled *
{
filter: alpha(opacity=60);
@@ -280,10 +283,7 @@
}
-.cke_skin_office2003 .cke_button a:hover.cke_on,
-.cke_skin_office2003 .cke_button a:focus.cke_on,
-.cke_skin_office2003 .cke_button a:active.cke_on, /* IE */
-.cke_skin_office2003 .cke_button a:hover.cke_off,
-.cke_skin_office2003 .cke_button a:focus.cke_off,
-.cke_skin_office2003 .cke_button a:active.cke_off /* IE */
+.cke_skin_office2003 .cke_button a:hover,
+.cke_skin_office2003 .cke_button a:focus,
+.cke_skin_office2003 .cke_button a:active /* IE */
{
border: solid 1px #316ac5;
@@ -295,15 +295,4 @@
_margin: 2px 0 0 0;
padding: 2px 4px;
-}
-
-.cke_skin_office2003 .cke_hc .cke_button a:hover.cke_on,
-.cke_skin_office2003 .cke_hc .cke_button a:focus.cke_on,
-.cke_skin_office2003 .cke_hc .cke_button a:active.cke_on, /* IE */
-.cke_skin_office2003 .cke_hc .cke_button a:hover.cke_off,
-.cke_skin_office2003 .cke_hc .cke_button a:focus.cke_off,
-.cke_skin_office2003 .cke_hc .cke_button a:active.cke_off /* IE */
-{
- padding: 0 2px !important;
- border-width: 3px;
}
@@ -323,5 +312,4 @@
display: none;
padding-left: 3px;
- vertical-align: 3px;
cursor: default;
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/dialog.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/dialog.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/dialog.css (revision 5332)
@@ -615,5 +615,4 @@
.cke_skin_v2 .cke_dialog #ImagePreviewBox
{
- white-space : normal;
border : 2px ridge black;
overflow : scroll;
@@ -623,4 +622,15 @@
background-color : white;
}
+
+.cke_skin_v2 .cke_dialog #ImagePreviewBox table td {
+ white-space: normal;
+}
+
+/* Fix iframedialog's height doesn't stretch to 100% #4863.*/
+.cke_skin_v2 .cke_browser_iequirks .cke_dialog_page_contents
+{
+ _position: absolute;
+}
+
.cke_skin_v2 .cke_dialog #ImagePreviewLoader
{
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/editor.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/editor.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/editor.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/elementspath.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/elementspath.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/elementspath.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/menu.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/menu.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/menu.css (revision 5332)
@@ -33,19 +33,4 @@
}
-.cke_skin_v2 .cke_menuitem a.cke_disabled:hover,
-.cke_skin_v2 .cke_menuitem a.cke_disabled:focus,
-.cke_skin_v2 .cke_menuitem a.cke_disabled:active
-{
- background-color: transparent !important;
-}
-
-.cke_hc .cke_menuitem a.cke_disabled:hover,
-.cke_hc .cke_menuitem a.cke_disabled:focus,
-.cke_hc .cke_menuitem a.cke_disabled:active
-{
- border-width: 0px;
-}
-
-
.cke_skin_v2 .cke_menuitem .cke_icon
{
@@ -74,4 +59,5 @@
filter: alpha(opacity=70); /* IE */
opacity: 0.70; /* Safari, Opera and Mozilla */
+ clear: both;
}
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/presets.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/presets.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/presets.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/reset.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/reset.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/reset.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/_source/skins/v2/toolbar.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/skins/v2/toolbar.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/skins/v2/toolbar.css (revision 5332)
@@ -16,4 +16,11 @@
{
white-space: normal;
+}
+
+.cke_skin_v2 .cke_toolbox
+{
+ clear: both;
+ /* Define the padding-bottom otherwise the collapser button will not be clickable #4932*/
+ padding-bottom: 1px;
}
@@ -232,21 +239,13 @@
}
-.cke_skin_v2 .cke_hc .cke_button a.cke_on
-{
- padding: 0 2px !important;
- border-width: 3px;
-}
-
-.cke_skin_v2 .cke_button a.cke_disabled,
-.cke_skin_v2 .cke_browser_ie a:hover.cke_button .cke_disabled
-{
- border: solid 1px #efefde;
- background-color: #efefde;
+.cke_skin_v2 .cke_button a.cke_disabled *,
+.cke_skin_v2 .cke_browser_ie a:hover.cke_button .cke_disabled *
+{
filter: alpha(opacity=30); /* IE */
- opacity : 0.3; /* Safari, Opera and Mozilla */
-}
-
-.cke_skin_v2 .cke_hc .cke_button a.cke_disabled,
-.cke_skin_v2 .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled
+ opacity: 0.3; /* Safari, Opera and Mozilla */
+}
+
+.cke_skin_v2 .cke_hc .cke_button a.cke_disabled *,
+.cke_skin_v2 .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled *
{
filter: alpha(opacity=60);
@@ -254,24 +253,16 @@
}
-.cke_skin_v2 .cke_button a:hover.cke_on,
-.cke_skin_v2 .cke_button a:focus.cke_on,
-.cke_skin_v2 .cke_button a:active.cke_on, /* IE */
-.cke_skin_v2 .cke_button a:hover.cke_off,
-.cke_skin_v2 .cke_button a:focus.cke_off,
-.cke_skin_v2 .cke_button a:active.cke_off /* IE */
+.cke_skin_v2 .cke_button a:hover,
+.cke_skin_v2 .cke_button a:focus,
+.cke_skin_v2 .cke_button a:active /* IE */
{
border: solid 1px #316ac5;
background-color: #dff1ff;
- filter: alpha(opacity=100); /* IE */
- opacity: 1; /* Safari, Opera and Mozilla */
padding: 2px 4px;
}
-.cke_skin_v2 .cke_hc .cke_button a:hover.cke_on,
-.cke_skin_v2 .cke_hc .cke_button a:focus.cke_on,
-.cke_skin_v2 .cke_hc .cke_button a:active.cke_on, /* IE */
-.cke_skin_v2 .cke_hc .cke_button a:hover.cke_off,
-.cke_skin_v2 .cke_hc .cke_button a:focus.cke_off,
-.cke_skin_v2 .cke_hc .cke_button a:active.cke_off /* IE */
+.cke_skin_v2 .cke_hc .cke_button a:hover,
+.cke_skin_v2 .cke_hc .cke_button a:focus,
+.cke_skin_v2 .cke_hc .cke_button a:active /* IE */
{
padding: 0 2px !important;
@@ -295,5 +286,4 @@
display: none;
padding-left: 3px;
- vertical-align: 3px;
}
Index: /CKEditor/branches/versions/3.2.x/_source/themes/default/theme.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/_source/themes/default/theme.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/_source/themes/default/theme.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -230,4 +230,6 @@
{
var container = editor.container;
+ container.clearCustomData();
+ editor.element.clearCustomData();
/*
@@ -257,8 +259,7 @@
if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE )
- {
editor.element.show();
- delete editor.element;
- }
+
+ delete editor.element;
}
};
Index: /CKEditor/branches/versions/3.2.x/ckeditor.pack
===================================================================
--- /CKEditor/branches/versions/3.2.x/ckeditor.pack (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/ckeditor.pack (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
* CKPackager - Sample Package file
*/
Index: /CKEditor/branches/versions/3.2.x/ckeditor_basic_source.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/ckeditor_basic_source.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/ckeditor_basic_source.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/config.js
===================================================================
--- /CKEditor/branches/versions/3.2.x/config.js (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/config.js (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
Index: /CKEditor/branches/versions/3.2.x/contents.css
===================================================================
--- /CKEditor/branches/versions/3.2.x/contents.css (revision 5331)
+++ /CKEditor/branches/versions/3.2.x/contents.css (revision 5332)
@@ -1,3 +1,3 @@
-/*
+/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
|