Explorar el Código

Add manual test.

Mateusz Samsel hace 6 años
padre
commit
1de1886b08

+ 8 - 0
packages/ckeditor5-link/tests/manual/linkdecorator.html

@@ -0,0 +1,8 @@
+<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="//ckeditor.com">CKEditor5</a> as schemaless url.</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 <a href="mailto:random@user.org">mail</a>.</p>
+	<p>This is some <a href="tel:123456789">phone number</a>.</p>
+</div>

+ 26 - 0
packages/ckeditor5-link/tests/manual/linkdecorator.js

@@ -0,0 +1,26 @@
+/**
+ * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals console:false, window, document */
+
+import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
+import Enter from '@ckeditor/ckeditor5-enter/src/enter';
+import Typing from '@ckeditor/ckeditor5-typing/src/typing';
+import Link from '../../src/link';
+import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
+import Undo from '@ckeditor/ckeditor5-undo/src/undo';
+import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ Link, Typing, Paragraph, Clipboard, Undo, Enter ],
+		toolbar: [ 'link', 'undo', 'redo' ]
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 1 - 0
packages/ckeditor5-link/tests/manual/linkdecorator.md

@@ -0,0 +1 @@
+## play with it