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

Tests: Update texttransformation manual test config and docs

panr 6 лет назад
Родитель
Сommit
b830c663fe

+ 4 - 2
packages/ckeditor5-typing/tests/manual/texttransformation.js

@@ -10,16 +10,18 @@ import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import TextTransformation from '../../src/texttransformation';
+import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock';
 
 ClassicEditor
 	.create( global.document.querySelector( '#editor' ), {
-		plugins: [ ArticlePluginSet, TextTransformation ],
+		plugins: [ ArticlePluginSet, TextTransformation, CodeBlock ],
 		toolbar: [
 			'heading',
 			'|', 'bulletedList', 'numberedList', 'blockQuote',
 			'|', 'bold', 'italic', 'link',
 			'|', 'insertTable',
-			'|', 'undo', 'redo'
+			'|', 'codeBlock',
+			'|', 'undo', 'redo',
 		],
 		image: {
 			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]

+ 9 - 4
packages/ckeditor5-typing/tests/manual/texttransformation.md

@@ -17,17 +17,22 @@ Some of the transformations are:
     * Operators: `<=` to `≤`, `>=` to `≥`, `!=` to `≠`.
 
 1. Typography:
-    
+
     * Dashes: ` -- `, ` --- `.
     * Ellipsis: `...` to `…`
-    
+
 1. Quotes:
 
-    * Primary quotes (english): `'Foo bar'` to `‘Foo bar’` 
+    * Primary quotes (english): `'Foo bar'` to `‘Foo bar’`
     * Secondary quotes (english): `"Foo bar's"` to `“Foo bar's”`
 
 ### Testing
 
 * Check if the transformation works. Note that some might need a space to trigger (dashes).
 * Undo a text transformation and type - it should not re-transform it.
-* Change selection - the not transformed elements should stay. 
+* Change selection - the not transformed elements should stay.
+
+### Behaviour inside the code blocks
+
+The transformations **dont work inside the code blocks**. If selection is inside the code block, the TextWatcher becomes disabled.
+When selection moves outside the code block, the TextWatcher becomes enabled again.