8
0
فهرست منبع

Tests: Created a manual test for alignment in RTL content.

Aleksander Nowodzinski 6 سال پیش
والد
کامیت
6d2d2ab7cc

+ 9 - 0
packages/ckeditor5-alignment/tests/manual/rtl.html

@@ -0,0 +1,9 @@
+<div id="editor">
+	<p>This should be aligned to the right</p>
+
+	<p style="text-align:left">This should be aligned to the left.</p>
+
+	<p style="text-align:center">This should be centered.</p>
+
+	<p style="text-align:justify">This should be justified but also to the right. This should be justified but also to the right. This should be justified but also to the right.</p>
+</div>

+ 26 - 0
packages/ckeditor5-alignment/tests/manual/rtl.js

@@ -0,0 +1,26 @@
+/**
+ * @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 ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
+import Alignment from '../../src/alignment';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		language: 'ar',
+		contentLanguage: 'ar',
+		plugins: [ ArticlePluginSet, Alignment ],
+		toolbar: [
+			'heading', '|', 'alignment', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo'
+		]
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 6 - 0
packages/ckeditor5-alignment/tests/manual/rtl.md

@@ -0,0 +1,6 @@
+## Text alignment and RTL content
+
+1. The editor should run in RTL mode.
+1. Paragraphs in the content should be aligned according to the text inside.
+1. See the toolbar (dropdown) icon as you travel across the document with your caret. The icon should reflect the alignment (default is **right**).
+1. You should be able to use the dropdown to change the alignment of existing and new text.