Переглянути джерело

Attach CKEditor inspector to all editors in link decorators manual test.

Maciej Gołaszewski 6 роки тому
батько
коміт
790de21335

+ 1 - 1
packages/ckeditor5-link/tests/manual/linkdecorator.html

@@ -1,6 +1,6 @@
 <h2>Manual decorators</h2>
 <h2>Manual decorators</h2>
 <div id="editor">
 <div id="editor">
-	<p>This is <a href="http://ckeditor.com">CKEditor5</a> from <a href="http://cksource.com">CKSource</a>.</p>
+	<p>This is <a href="http://ckeditor.com">CKEditor5</a> from <a href="http://cksource.com" target="_blank" rel="noopener noreferrer">CKSource</a>.</p>
 	<p>This is <a href="//ckeditor.com">CKEditor5</a> as schemaless url.</p>
 	<p>This is <a href="//ckeditor.com">CKEditor5</a> as schemaless url.</p>
 	<p>This is <a href="#anchor">anchor</a> on this page.</p>
 	<p>This is <a href="#anchor">anchor</a> on this page.</p>
 	<p>This is some random <a href="ftp://127.0.0.1">ftp address</a>.</p>
 	<p>This is some random <a href="ftp://127.0.0.1">ftp address</a>.</p>

+ 7 - 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,10 @@ 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';
 
 
+if ( !window.editors ) {
+	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 +52,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 +84,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 => {