stickytoolbarview.js 623 B

123456789101112131415161718192021222324
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import testUtils from '../../../tests/_utils/utils';
  6. import StickyToolbarView from '../../../src/toolbar/sticky/stickytoolbarview';
  7. import '@ckeditor/ckeditor5-theme-lark/theme/theme.scss';
  8. const ui = testUtils.createTestUIView( {
  9. top: '.ck-editor__top'
  10. } );
  11. createToolbar( ui.top );
  12. function createToolbar( collection ) {
  13. const toolbar = new StickyToolbarView();
  14. toolbar.limiterElement = collection._parentElement.parentNode;
  15. collection.add( toolbar );
  16. toolbar.isActive = true;
  17. }