Skip to content
Permalink
Browse files

Merge branch 't/11580b' into major

  • Loading branch information...
Reinmar committed Jan 28, 2015
2 parents d8acd2b + 9af0920 commit ab1444001d72fd91c2fbf55fab017d8684b83b73
@@ -19,6 +19,7 @@ New Features:
* [#12036](http://dev.ckeditor.com/ticket/12036): Initialize editor in [`readOnly`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-readOnly) mode when `<textarea>` has `readonly` attribute.
* [#11905](http://dev.ckeditor.com/ticket/11905): [`resize` event](http://docs.ckeditor.dev/#!/api/CKEDITOR.editor-event-resize) pass dimensions in data.
* [#12126](http://dev.ckeditor.com/ticket/12126): Introduced [`image_prefillDimensions`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image_prefillDimensions) and [`image2_prefillDimensions`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_prefillDimensions) to make pre-filling 'width' and 'height' configurable.
* [#11580](http://dev.ckeditor.com/ticket/11580): Introduced the [notifications system](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.notification).

Fixed Issues:

@@ -71,6 +71,7 @@

// Editable itself is the outermost element.
editor.container = element;
editor.ui.contentsElement = element;

// Load and process editor data.
editor.setData( editor.getData( 1 ) );
@@ -433,6 +433,7 @@ CKEDITOR.replaceClass = 'ckeditor';
}

editor.container = container;
editor.ui.contentsElement = editor.ui.space( 'contents' );

// Make top and bottom spaces unelectable, but not content space,
// otherwise the editable area would be affected.
@@ -1164,19 +1164,24 @@
* @since 4.2.1
* @param {Number} minInterval Minimum interval between `output` calls in milliseconds.
* @param {Function} output Function that will be executed as `output`.
* @param {Object} [scopeObj] The object used to scope the listener call (the `this` object).
* @returns {Object}
* @returns {Function} return.input Buffer's input method.
* @returns {Function} return.reset Resets buffered events &mdash; `output` will not be executed
* until next `input` is triggered.
*/
eventsBuffer: function( minInterval, output ) {
eventsBuffer: function( minInterval, output, scopeObj ) {
var scheduled,
lastOutput = 0;

function triggerOutput() {
lastOutput = ( new Date() ).getTime();
scheduled = false;
output();
if ( scopeObj ) {
output.call( scopeObj );
} else {
output();
}
}

return {
@@ -166,3 +166,20 @@ CKEDITOR.event.implementOn( CKEDITOR.ui );
* @returns {Object} The UI element.
* @todo We lack the "UI element" abstract super class.
*/

/**
* The element in the {@link CKEDITOR#document host page's document} which contains the editor content.
* If the [fixed editor UI](http://sdk.ckeditor.com/samples/fixedui.html) is used, then it will be set to
* `editor.ui.space( 'contents' )` &mdash; i.e. the `<div>` which contains an `<iframe>` (in case of the classic UI)
* or {@link CKEDITOR.editable} (in case of the inline UI). Otherwise it is set to the {@link CKEDITOR.editable} itself.
*
* Use position of this element if you need to position elements placed in the host page's document relatively to the
* editor content.
*
* var editor = CKEDITOR.instances.editor1;
* console.log( editor.ui.contentsElement.getName() ); // 'div'
*
* @since 4.5
* @readonly
* @property {CKEDITOR.dom.element} contentsElement
*/
@@ -75,8 +75,14 @@
if ( !( editable = editor.editable() ) )
return;

var show = ( evt && evt.name == 'focus' );

// Show up the space on focus gain.
evt && evt.name == 'focus' && floatSpace.show();
if ( show ) {
floatSpace.show();
}

editor.fire( 'floatingSpaceLayout', { show: show } );

// Reset the horizontal position for below measurement.
floatSpace.removeStyle( 'left' );
@@ -392,3 +398,15 @@
* @cfg {Boolean} [floatSpacePreferRight=false]
* @member CKEDITOR.config
*/

/**
* Fired when the viewport or editor parameters changes and the floating space needs to check and
* eventually update its position and dimensions.
*
* @since 4.5
* @event floatingSpaceLayout
* @member CKEDITOR.editor
* @param {CKEDITOR.editor} editor The editor instance.
* @param data
* @param {Boolean} data.show True if floating space should show up as a result of this event.
*/
@@ -0,0 +1,7 @@
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'notification', 'en', {
closed: 'Notification closed.'
} );

0 comments on commit ab14440

Please sign in to comment.
You can’t perform that action at this time.