8
0
Просмотр исходного кода

The Essentials plugin is defined in ckeditor5-essentials package and that's where we should add the ShiftEnter plugin.

Piotrek Koszuliński 7 лет назад
Родитель
Сommit
fe80199f17

+ 0 - 33
packages/ckeditor5-enter/src/essentials.js

@@ -1,33 +0,0 @@
-/**
- * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-/**
- * @module enter/essentials
- */
-
-import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
-import Enter from './enter';
-import ShiftEnter from './shiftenter';
-
-/**
- * The Essentials feature. Handles the <kbd>Enter</kbd> and <kbd>Shift + Enter</kbd> keys in the editor.
- *
- * @extends module:core/plugin~Plugin
- */
-export default class Essentials extends Plugin {
-	/**
-	 * @inheritDoc
-	 */
-	static get requires() {
-		return [ Enter, ShiftEnter ];
-	}
-
-	/**
-	 * @inheritDoc
-	 */
-	static get pluginName() {
-		return 'Essentials';
-	}
-}

+ 0 - 18
packages/ckeditor5-enter/tests/essentials.js

@@ -1,18 +0,0 @@
-/**
- * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-import Essentials from '../src/essentials';
-import Enter from '../src/enter';
-import ShiftEnter from '../src/shiftenter';
-
-describe( 'Essentials Feature', () => {
-	it( 'should require Enter and ShiftEnter', () => {
-		expect( Essentials.requires ).to.deep.equal( [ Enter, ShiftEnter ] );
-	} );
-
-	it( 'should be named', () => {
-		expect( Essentials.pluginName ).to.equal( 'Essentials' );
-	} );
-} );

+ 3 - 2
packages/ckeditor5-enter/tests/manual/enter.js

@@ -6,7 +6,8 @@
 /* globals console:false, document, window */
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
-import Essentials from '../../src/essentials';
+import Enter from '../../src/enter';
+import ShiftEnter from '../../src/shiftenter';
 import Typing from '@ckeditor/ckeditor5-typing/src/typing';
 import Heading from '@ckeditor/ckeditor5-heading/src/heading';
 import Undo from '@ckeditor/ckeditor5-undo/src/undo';
@@ -15,7 +16,7 @@ import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
 
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
-		plugins: [ Essentials, Typing, Heading, Undo, Bold, Italic ],
+		plugins: [ Enter, ShiftEnter, Typing, Heading, Undo, Bold, Italic ],
 		toolbar: [ 'heading', '|', 'bold', 'italic', 'undo', 'redo' ]
 	} )
 	.then( editor => {