8
0
فهرست منبع

Internal: Aligned code to changes in ckeditor5-core. See ckeditor/ckeditor5-core#140.

Piotrek Koszuliński 7 سال پیش
والد
کامیت
b3e8b71125

+ 77 - 78
packages/ckeditor5-build-decoupled-document/src/ckeditor.js

@@ -31,82 +31,81 @@ import TabletoolbarPlugin from '@ckeditor/ckeditor5-table/src/tabletoolbar';
 
 export default class DecoupledEditor extends DecoupledEditorBase {}
 
-DecoupledEditor.build = {
-	plugins: [
-		EssentialsPlugin,
-		AlignmentPlugin,
-		FontsizePlugin,
-		FontfamilyPlugin,
-		HighlightPlugin,
-		UploadadapterPlugin,
-		AutoformatPlugin,
-		BoldPlugin,
-		ItalicPlugin,
-		StrikethroughPlugin,
-		UnderlinePlugin,
-		BlockquotePlugin,
-		EasyimagePlugin,
-		HeadingPlugin,
-		ImagePlugin,
-		ImagecaptionPlugin,
-		ImagestylePlugin,
-		ImagetoolbarPlugin,
-		ImageuploadPlugin,
-		LinkPlugin,
-		ListPlugin,
-		ParagraphPlugin,
-		TablePlugin,
-		TabletoolbarPlugin
-	],
-	config: {
-		toolbar: {
-			items: [
-				'heading',
-				'|',
-				'fontsize',
-				'fontfamily',
-				'|',
-				'bold',
-				'italic',
-				'underline',
-				'strikethrough',
-				'highlight',
-				'|',
-				'alignment',
-				'|',
-				'numberedList',
-				'bulletedList',
-				'|',
-				'link',
-				'blockquote',
-				'imageUpload',
-				'insertTable',
-				'|',
-				'undo',
-				'redo'
-			]
-		},
-		image: {
-			styles: [
-				'full',
-				'alignLeft',
-				'alignRight'
-			],
-			toolbar: [
-				'imageStyle:alignLeft',
-				'imageStyle:full',
-				'imageStyle:alignRight',
-				'|',
-				'imageTextAlternative'
-			]
-		},
-		table: {
-			toolbar: [
-				'tableColumn',
-				'tableRow',
-				'mergeTableCells'
-			]
-		},
-		language: 'en'
-	}
+DecoupledEditor.builtinPlugins = [
+	EssentialsPlugin,
+	AlignmentPlugin,
+	FontsizePlugin,
+	FontfamilyPlugin,
+	HighlightPlugin,
+	UploadadapterPlugin,
+	AutoformatPlugin,
+	BoldPlugin,
+	ItalicPlugin,
+	StrikethroughPlugin,
+	UnderlinePlugin,
+	BlockquotePlugin,
+	EasyimagePlugin,
+	HeadingPlugin,
+	ImagePlugin,
+	ImagecaptionPlugin,
+	ImagestylePlugin,
+	ImagetoolbarPlugin,
+	ImageuploadPlugin,
+	LinkPlugin,
+	ListPlugin,
+	ParagraphPlugin,
+	TablePlugin,
+	TabletoolbarPlugin
+];
+
+DecoupledEditor.defaultConfig = {
+	toolbar: {
+		items: [
+			'heading',
+			'|',
+			'fontsize',
+			'fontfamily',
+			'|',
+			'bold',
+			'italic',
+			'underline',
+			'strikethrough',
+			'highlight',
+			'|',
+			'alignment',
+			'|',
+			'numberedList',
+			'bulletedList',
+			'|',
+			'link',
+			'blockquote',
+			'imageUpload',
+			'insertTable',
+			'|',
+			'undo',
+			'redo'
+		]
+	},
+	image: {
+		styles: [
+			'full',
+			'alignLeft',
+			'alignRight'
+		],
+		toolbar: [
+			'imageStyle:alignLeft',
+			'imageStyle:full',
+			'imageStyle:alignRight',
+			'|',
+			'imageTextAlternative'
+		]
+	},
+	table: {
+		toolbar: [
+			'tableColumn',
+			'tableRow',
+			'mergeTableCells'
+		]
+	},
+	language: 'en'
 };

+ 2 - 2
packages/ckeditor5-build-decoupled-document/tests/ckeditor.js

@@ -27,11 +27,11 @@ describe( 'DecoupledEditor build', () => {
 
 	describe( 'buid', () => {
 		it( 'contains plugins', () => {
-			expect( DecoupledEditor.build.plugins ).to.not.be.empty;
+			expect( DecoupledEditor.builtinPlugins ).to.not.be.empty;
 		} );
 
 		it( 'contains config', () => {
-			expect( DecoupledEditor.build.config.toolbar ).to.not.be.empty;
+			expect( DecoupledEditor.defaultConfig.toolbar ).to.not.be.empty;
 		} );
 	} );