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

Merge branch 't/manual-test-update' into t/233

# Conflicts:
#	tests/manual/linkdecorator.html
Maciej Gołaszewski 6 лет назад
Родитель
Сommit
ef84b8cad2
1 измененных файлов с 5 добавлено и 8 удалено
  1. 5 8
      packages/ckeditor5-link/tests/manual/linkdecorator.js

+ 5 - 8
packages/ckeditor5-link/tests/manual/linkdecorator.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-/* globals console:false, window, document */
+/* globals console:false, window, document, CKEditorInspector */
 
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 import Enter from '@ckeditor/ckeditor5-enter/src/enter';
 import Enter from '@ckeditor/ckeditor5-enter/src/enter';
@@ -16,6 +16,8 @@ import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
 // Just to have nicely styles switchbutton;
 // Just to have nicely styles switchbutton;
 import '@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css';
 import '@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css';
 
 
+window.editors = {};
+
 ClassicEditor
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
 	.create( document.querySelector( '#editor' ), {
 		plugins: [ Link, Typing, Paragraph, Clipboard, Undo, Enter ],
 		plugins: [ Link, Typing, Paragraph, Clipboard, Undo, Enter ],
@@ -48,10 +50,7 @@ ClassicEditor
 		}
 		}
 	} )
 	} )
 	.then( editor => {
 	.then( editor => {
-		if ( !window.editors ) {
-			window.editors = {};
-		}
-		window.editor = editor;
+		CKEditorInspector.attach( 'manual', editor );
 		window.editors.manualDecorators = editor;
 		window.editors.manualDecorators = editor;
 	} )
 	} )
 	.catch( err => {
 	.catch( err => {
@@ -83,9 +82,7 @@ ClassicEditor
 		}
 		}
 	} )
 	} )
 	.then( editor => {
 	.then( editor => {
-		if ( !window.editors ) {
-			window.editors = {};
-		}
+		CKEditorInspector.attach( 'automatic', editor );
 		window.editors.automaticDecorators = editor;
 		window.editors.automaticDecorators = editor;
 	} )
 	} )
 	.catch( err => {
 	.catch( err => {