Skip to content

Commit 0b94e09

Browse files
committed
Merge branch 't/9829' into major
2 parents 87e128d + 0249356 commit 0b94e09

File tree

39 files changed

+1906
-297
lines changed

39 files changed

+1906
-297
lines changed

core/command.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ CKEDITOR.command = function( editor, commandDefinition ) {
4343
if ( this.state == CKEDITOR.TRISTATE_DISABLED )
4444
return false;
4545

46+
// Test if this command is allowed.
47+
if ( !editor.filter.checkFeature( this ) )
48+
return false;
49+
4650
if ( this.editorFocus ) // Give editor focus if necessary (#4355).
47-
editor.focus();
51+
editor.focus();
4852

4953
if ( this.fire( 'exec' ) === false )
5054
return true;

core/creators/themedui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ CKEDITOR.replaceClass = 'ckeditor';
302302

303303
// Get the HTML for the predefined spaces.
304304
var topHtml = editor.fire( 'uiSpace', { space: 'top', html: '' } ).html;
305-
var bottomHtml = editor.fireOnce( 'uiSpace', { space: 'bottom', html: '' } ).html;
305+
var bottomHtml = editor.fire( 'uiSpace', { space: 'bottom', html: '' } ).html;
306306

307307
if ( !themedTpl ) {
308308
themedTpl = CKEDITOR.addTemplate( 'maincontainer', '<{outerEl}' +

core/editor.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@
325325
function initComponents( editor ) {
326326
// Documented in dataprocessor.js.
327327
editor.dataProcessor = new CKEDITOR.htmlDataProcessor( editor );
328+
editor.filter = new CKEDITOR.filter( editor );
328329
loadSkin( editor );
329330
}
330331

@@ -941,6 +942,16 @@
941942
else
942943
delete keystrokes[ keystroke ];
943944
}
945+
},
946+
947+
/**
948+
* Shorthand for {@link CKEDITOR.filter#addFeature}.
949+
*
950+
* @param feature See {@link CKEDITOR.filter#addFeature}.
951+
* @returns {Boolean} See {@link CKEDITOR.filter#addFeature}.
952+
*/
953+
addFeature: function( feature ) {
954+
return this.filter.addFeature( feature );
944955
}
945956
});
946957
})();

0 commit comments

Comments
 (0)