Skip to content
Permalink
Browse files

Merge branch 't/12112' into major

  • Loading branch information...
Reinmar committed Jun 26, 2014
2 parents 1347d37 + 9d9997c commit 34467c637a414be2fdbebef3b01e8fcf1d801ac0
Showing with 8 additions and 10 deletions.
  1. +4 −0 CHANGES.md
  2. +0 −8 plugins/widget/plugin.js
  3. +4 −2 tests/plugins/widget/nestededitables.js
@@ -3,6 +3,10 @@ CKEditor 4 Changelog

## CKEditor 4.5

New Features:

* [#10931](http://dev.ckeditor.com/ticket/10931): Introduce ability to insert widgets into another widget's nested editables. Note that unless nested editable's [allowed content](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.nestedEditable.definition-property-allowedContent) is defined precisely since CKEditor 4.5 some widget buttons may become enabled.

Fixed Issues:

* [#12018](http://dev.ckeditor.com/ticket/12018): [Nested widgets] Fixed and reviewed: Nested widgets garbage collection.
@@ -1710,14 +1710,6 @@
}
},

refresh: function( editor, path ) {
// Disable widgets' commands inside nested editables -
// check if blockLimit is a nested editable or a descendant of any.
this.setState( getNestedEditable( editor.editable(), path.blockLimit ) ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_OFF );
},
// A hack to force command refreshing on context change.
context: 'div',

allowedContent: widgetDef.allowedContent,
requiredContent: widgetDef.requiredContent,
contentForms: widgetDef.contentForms,
@@ -1147,7 +1147,9 @@
} );
},

'test widgets\' commands are disabled in nested editable': function() {
// Behaviour has been changed in 4.5 (#12112), so we're leaving this
// test as a validation of this change.
'test widgets\' commands are enabled in nested editable': function() {
var editor = this.editor,
bot = this.editorBot;

@@ -1172,7 +1174,7 @@
range.collapse( true );
range.select();

assert.areSame( CKEDITOR.TRISTATE_DISABLED, editor.commands.testcommand1.state, 'command is disabled in nested editable' );
assert.areSame( CKEDITOR.TRISTATE_OFF, editor.commands.testcommand1.state, 'command is enabled in nested editable' );
} );
},

0 comments on commit 34467c6

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