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

Added "autoformat" plugin; some improvements in builds.

Kamil Piechaczek 8 лет назад
Родитель
Сommit
aec2b5cbd8

+ 2 - 1
packages/ckeditor5-build-classic/build-config.js

@@ -9,9 +9,10 @@ module.exports = {
 	destinationPath: './build/',
 	editor: '@ckeditor/ckeditor5-editor-classic/src/classic',
 	plugins: [
+		'@ckeditor/ckeditor5-autoformat/src/autoformat',
+		'@ckeditor/ckeditor5-clipboard/src/clipboard',
 		'@ckeditor/ckeditor5-basic-styles/src/bold',
 		'@ckeditor/ckeditor5-basic-styles/src/italic',
-		'@ckeditor/ckeditor5-clipboard/src/clipboard',
 		'@ckeditor/ckeditor5-enter/src/enter',
 		'@ckeditor/ckeditor5-heading/src/heading',
 		'@ckeditor/ckeditor5-image/src/image',

+ 5 - 3
packages/ckeditor5-build-classic/ckeditor.js

@@ -4,9 +4,10 @@
  */
 
 import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classic';
+import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
+import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard';
 import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
 import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
-import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard';
 import EnterPlugin from '@ckeditor/ckeditor5-enter/src/enter';
 import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
 import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
@@ -19,13 +20,14 @@ import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import TypingPlugin from '@ckeditor/ckeditor5-typing/src/typing';
 import UndoPlugin from '@ckeditor/ckeditor5-undo/src/undo';
 
-export default class ClassicEditor extends ClassicEditorBase {}
+export class ClassicEditor extends ClassicEditorBase {}
 
 ClassicEditor.build = {
 	plugins: [
+		AutoformatPlugin,
+		ClipboardPlugin,
 		BoldPlugin,
 		ItalicPlugin,
-		ClipboardPlugin,
 		EnterPlugin,
 		HeadingPlugin,
 		ImagePlugin,

+ 1 - 0
packages/ckeditor5-build-classic/package.json

@@ -7,6 +7,7 @@
     "@ckeditor/ckeditor5-dev-utils": "^2.4.2",
     "@ckeditor/ckeditor5-dev-webpack-utils": "^1.0.0",
     "@ckeditor/ckeditor5-editor-classic": "*",
+    "@ckeditor/ckeditor5-autoformat": "*",
     "@ckeditor/ckeditor5-basic-styles": "*",
     "@ckeditor/ckeditor5-clipboard": "*",
     "@ckeditor/ckeditor5-enter": "*",

+ 1 - 1
packages/ckeditor5-build-classic/sample/index.html

@@ -163,7 +163,7 @@
 </footer>
 <script src="../build/ckeditor.es6.js"></script>
 <script>
-	ClassicEditor.default.create( document.querySelector( '#editor' ) )
+	ClassicEditor.create( document.querySelector( '#editor' ) )
 		.then( editor => {
 			window.editor = editor;
 		} )

+ 3 - 1
packages/ckeditor5-build-classic/tests/ckeditor.js

@@ -5,8 +5,9 @@
 
 /* globals document */
 
-import ClassicEditor from '../ckeditor';
+import { ClassicEditor } from '../ckeditor';
 import BaseClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classic';
+import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
 import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
 import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard';
 import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
@@ -50,6 +51,7 @@ describe( 'ClassicEditor', () => {
 
 		it( 'should load all its dependencies', () => {
 			expect( editor.plugins.get( ParagraphPlugin ) ).to.be.instanceOf( ParagraphPlugin );
+			expect( editor.plugins.get( AutoformatPlugin ) ).to.be.instanceOf( AutoformatPlugin );
 			expect( editor.plugins.get( BoldPlugin ) ).to.be.instanceOf( BoldPlugin );
 			expect( editor.plugins.get( HeadingPlugin ) ).to.be.instanceOf( HeadingPlugin );
 			expect( editor.plugins.get( ImagePlugin ) ).to.be.instanceOf( ImagePlugin );

+ 1 - 1
packages/ckeditor5-build-classic/tests/manual/ckeditor.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-import ClassicEditor from '../../build/ckeditor';
+import { ClassicEditor } from '../../build/ckeditor';
 
 ClassicEditor.create( document.querySelector( '#editor' ) )
 	.then( editor => {

+ 1 - 1
packages/ckeditor5-build-classic/tests/manual/ckeditor_es6.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-import ClassicEditor from '../../build/ckeditor.es6';
+import { ClassicEditor } from '../../build/ckeditor.es6';
 
 ClassicEditor.create( document.querySelector( '#editor' ) )
 	.then( editor => {