ソースを参照

Added very basic manual test for todo lists.

Oskar Wróbel 6 年 前
コミット
2869e50ce2

+ 22 - 0
packages/ckeditor5-list/tests/manual/todo-list.html

@@ -0,0 +1,22 @@
+<div id="editor">
+	<p>This is a test for list feature.</p>
+	<p>Some more text for testing.</p>
+	<ul>
+		<li>Bullet list item 1</li>
+		<li>Bullet list item 2</li>
+		<li>Bullet list item 3</li>
+		<li>Bullet list item 4</li>
+		<li>Bullet list item 5</li>
+		<li>Bullet list item 6</li>
+		<li>Bullet list item 7</li>
+		<li>Bullet list item 8</li>
+	</ul>
+	<p>Paragraph.</p>
+	<p>Another testing paragraph.</p>
+	<ol>
+		<li>Numbered list item 1</li>
+	</ol>
+	<ul>
+		<li>Another bullet list</li>
+	</ul>
+</div>

+ 28 - 0
packages/ckeditor5-list/tests/manual/todo-list.js

@@ -0,0 +1,28 @@
+/**
+ * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
+ */
+
+/* globals console, 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 Heading from '@ckeditor/ckeditor5-heading/src/heading';
+import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
+import Undo from '@ckeditor/ckeditor5-undo/src/undo';
+import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
+import List from '../../src/list';
+import TodoList from '../../src/todolist';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ Enter, Typing, Heading, Paragraph, Undo, List, TodoList, Clipboard ],
+		toolbar: [ 'heading', '|', 'bulletedList', 'numberedList', 'todoList', '|', 'undo', 'redo' ]
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 0 - 0
packages/ckeditor5-list/tests/manual/todo-list.md