Преглед изворни кода

Merge branch 'master' into t/ckeditor5/447

Aleksander Nowodzinski пре 8 година
родитељ
комит
f8da564a4f

+ 1 - 1
packages/ckeditor5-core/package.json

@@ -10,7 +10,7 @@
   "devDependencies": {
     "@ckeditor/ckeditor5-dev-lint": "^3.1.0",
     "@ckeditor/ckeditor5-ui": "^0.9.0",
-    "eslint-config-ckeditor5": "^1.0.0",
+    "eslint-config-ckeditor5": "^1.0.5",
     "gulp": "^3.9.1",
     "guppy-pre-commit": "^0.4.0"
   },

+ 9 - 8
packages/ckeditor5-core/tests/_utils-tests/classictesteditor.js

@@ -107,14 +107,15 @@ describe( 'ClassicTestEditor', () => {
 				}
 			}
 
-			return ClassicTestEditor.create( editorElement, {
-				plugins: [ EventWatcher ]
-			} )
-			.then( editor => {
-				expect( fired ).to.deep.equal( [ 'pluginsReady', 'uiReady', 'dataReady', 'ready' ] );
-
-				return editor.destroy();
-			} );
+			return ClassicTestEditor
+				.create( editorElement, {
+					plugins: [ EventWatcher ]
+				} )
+				.then( editor => {
+					expect( fired ).to.deep.equal( [ 'pluginsReady', 'uiReady', 'dataReady', 'ready' ] );
+
+					return editor.destroy();
+				} );
 		} );
 
 		it( 'inserts editor UI next to editor element', () => {

+ 7 - 6
packages/ckeditor5-core/tests/_utils-tests/modeltesteditor.js

@@ -58,12 +58,13 @@ describe( 'ModelTestEditor', () => {
 				}
 			}
 
-			return ModelTestEditor.create( {
-				plugins: [ EventWatcher ]
-			} )
-			.then( () => {
-				expect( fired ).to.deep.equal( [ 'pluginsReady', 'dataReady', 'ready' ] );
-			} );
+			return ModelTestEditor
+				.create( {
+					plugins: [ EventWatcher ]
+				} )
+				.then( () => {
+					expect( fired ).to.deep.equal( [ 'pluginsReady', 'dataReady', 'ready' ] );
+				} );
 		} );
 	} );
 

+ 7 - 6
packages/ckeditor5-core/tests/_utils-tests/virtualtesteditor.js

@@ -57,12 +57,13 @@ describe( 'VirtualTestEditor', () => {
 				}
 			}
 
-			return VirtualTestEditor.create( {
-				plugins: [ EventWatcher ]
-			} )
-			.then( () => {
-				expect( fired ).to.deep.equal( [ 'pluginsReady', 'dataReady', 'ready' ] );
-			} );
+			return VirtualTestEditor
+				.create( {
+					plugins: [ EventWatcher ]
+				} )
+				.then( () => {
+					expect( fired ).to.deep.equal( [ 'pluginsReady', 'dataReady', 'ready' ] );
+				} );
 		} );
 	} );
 } );

+ 2 - 2
packages/ckeditor5-core/tests/commandcollection.js

@@ -66,7 +66,7 @@ describe( 'CommandCollection', () => {
 		it( 'returns iterator', () => {
 			const names = collection.names();
 
-			expect( names.next ).to.be.a.function;
+			expect( names.next ).to.be.a( 'function' );
 		} );
 
 		it( 'returns iterator of command names', () => {
@@ -81,7 +81,7 @@ describe( 'CommandCollection', () => {
 		it( 'returns iterator', () => {
 			const commands = collection.commands();
 
-			expect( commands.next ).to.be.a.function;
+			expect( commands.next ).to.be.a( 'function' );
 		} );
 
 		it( 'returns iterator of commands', () => {

+ 19 - 18
packages/ckeditor5-core/tests/manual/readonly.js

@@ -10,25 +10,26 @@ import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'
 import ArticlePreset from '@ckeditor/ckeditor5-presets/src/article';
 import ContextualToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/contextual/contextualtoolbar';
 
-ClassicEditor.create( document.querySelector( '#editor' ), {
-	plugins: [ ArticlePreset, ContextualToolbar ],
-	toolbar: [ 'headings', 'bold', 'italic', 'link', 'unlink', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
-	image: {
-		toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ],
-	},
-	contextualToolbar: [ 'bold', 'italic', 'link' ]
-} )
-.then( editor => {
-	window.editor = editor;
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ ArticlePreset, ContextualToolbar ],
+		toolbar: [ 'headings', 'bold', 'italic', 'link', 'unlink', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
+		image: {
+			toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ],
+		},
+		contextualToolbar: [ 'bold', 'italic', 'link' ]
+	} )
+	.then( editor => {
+		window.editor = editor;
 
-	const button = document.querySelector( '#read-only' );
+		const button = document.querySelector( '#read-only' );
 
-	button.addEventListener( 'click', () => {
-		editor.isReadOnly = !editor.isReadOnly;
-		button.textContent = editor.isReadOnly ? 'Turn off read-only mode' : 'Turn on read-only mode';
+		button.addEventListener( 'click', () => {
+			editor.isReadOnly = !editor.isReadOnly;
+			button.textContent = editor.isReadOnly ? 'Turn off read-only mode' : 'Turn on read-only mode';
+		} );
+	} )
+	.catch( err => {
+		console.error( err.stack );
 	} );
-} )
-.catch( err => {
-	console.error( err.stack );
-} );