boxededitorui.js 825 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. import EditorUI from '/ckeditor5/ui/editorui/editorui.js';
  7. import ControllerCollection from '/ckeditor5/ui/controllercollection.js';
  8. export default class BoxedEditorUI extends EditorUI {
  9. constructor( editor ) {
  10. super( editor );
  11. this.collections.add( new ControllerCollection( 'top' ) );
  12. this.collections.add( new ControllerCollection( 'editable' ) );
  13. const config = editor.config;
  14. /**
  15. * @property {Number} width
  16. */
  17. this.set( 'width', config.get( 'ui.width' ) );
  18. /**
  19. * @property {Number} height
  20. */
  21. this.set( 'height', config.get( 'ui.height' ) );
  22. }
  23. /**
  24. * @readonly
  25. * @property {Model} viewModel
  26. */
  27. get viewModel() {
  28. return this;
  29. }
  30. }