Imported CKEDITOR 3.0

Monotone-Parent: 5f9c08dd6b5b34d815ddb2108abbf4055e846934
Monotone-Revision: b2cf7eda0ef8f15fb6e78f8c38a7406a47bcdd2f

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-08-26T14:03:12
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-08-26 14:03:12 +00:00
parent 4d1a003124
commit 0ce87017d6
329 changed files with 5266 additions and 3451 deletions
@@ -69,30 +69,28 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
undoManager.save();
});
// Registering keydown on every document recreation.(#3844)
editor.on( 'contentDom', function()
{
editor.document.on( 'keydown', function( event )
{
// Do not capture CTRL hotkeys.
if ( !event.data.$.ctrlKey && !event.data.$.metaKey )
undoManager.type( event );
});
});
// Always save an undo snapshot - the previous mode might have
// changed editor contents.
editor.on( 'beforeModeUnload', function()
{
editor.mode == 'wysiwyg' && undoManager.save( true );
});
// Make the undo manager available only in wysiwyg mode.
editor.on( 'mode', function()
{
if ( editor.mode == 'wysiwyg' )
{
if ( !undoManager.enabled )
{
undoManager.enabled = true;
editor.document.on( 'keydown', function( event )
{
// Do not capture CTRL hotkeys.
if ( !event.data.$.ctrlKey && !event.data.$.metaKey )
undoManager.type( event );
});
// Always save an undo snapshot - the previous mode might have changed
// editor contents.
undoManager.save( true );
}
}
else
undoManager.enabled = false;
undoManager.enabled = editor.mode == 'wysiwyg';
undoManager.onChange();
});
@@ -481,4 +479,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
};
})();
/**
* The number of undo steps to be saved. The higher this setting value the more
* memory is used for it.
* @type Number
* @default 20
* @example
* config.undoStackSize = 50;
*/
CKEDITOR.config.undoStackSize = 20;