浏览代码

Merge branch 'master' into i/6432-schema-is-selectable

Aleksander Nowodzinski 5 年之前
父节点
当前提交
2ac4ea57a5
共有 100 个文件被更改,包括 1017 次插入417 次删除
  1. 180 1
      CHANGELOG.md
  2. 1 1
      docs/_snippets/examples/inline-editor.html
  3. 29 2
      docs/_snippets/examples/inline-editor.js
  4. 2 6
      docs/_snippets/framework/tutorials/using-react-in-widget.js
  5. 10 3
      docs/builds/guides/development/custom-builds.md
  6. 5 5
      docs/builds/guides/integration/advanced-setup.md
  7. 137 138
      docs/builds/guides/integration/content-styles.md
  8. 3 2
      docs/builds/guides/integration/installing-plugins.md
  9. 1 1
      docs/builds/guides/migrate.md
  10. 20 17
      docs/framework/guides/architecture/editing-engine.md
  11. 3 3
      docs/framework/guides/architecture/ui-library.md
  12. 3 1
      docs/framework/guides/contributing/development-environment.md
  13. 1 1
      docs/framework/guides/deep-dive/localization.md
  14. 1 1
      docs/framework/guides/development-tools.md
  15. 4 12
      docs/framework/guides/tutorials/using-react-in-a-widget.md
  16. 63 63
      package.json
  17. 2 2
      packages/ckeditor-cloud-services-core/package.json
  18. 21 0
      packages/ckeditor5-adapter-ckfinder/lang/translations/tk.po
  19. 13 13
      packages/ckeditor5-adapter-ckfinder/package.json
  20. 41 0
      packages/ckeditor5-alignment/lang/translations/tk.po
  21. 41 0
      packages/ckeditor5-alignment/lang/translations/ug.po
  22. 13 13
      packages/ckeditor5-alignment/package.json
  23. 14 13
      packages/ckeditor5-autoformat/package.json
  24. 5 4
      packages/ckeditor5-autoformat/src/autoformat.js
  25. 27 4
      packages/ckeditor5-autoformat/src/blockautoformatediting.js
  26. 1 1
      packages/ckeditor5-autoformat/src/inlineautoformatediting.js
  27. 71 8
      packages/ckeditor5-autoformat/tests/autoformat.js
  28. 30 4
      packages/ckeditor5-autoformat/tests/blockautoformatediting.js
  29. 5 7
      packages/ckeditor5-autoformat/tests/manual/autoformat.md
  30. 21 0
      packages/ckeditor5-autosave/lang/translations/tk.po
  31. 21 0
      packages/ckeditor5-autosave/lang/translations/ug.po
  32. 5 5
      packages/ckeditor5-autosave/package.json
  33. 1 1
      packages/ckeditor5-autosave/src/autosave.js
  34. 二进制
      packages/ckeditor5-basic-styles/docs/assets/img/typing-after-code.gif
  35. 二进制
      packages/ckeditor5-basic-styles/docs/assets/img/typing-inside-code.gif
  36. 12 0
      packages/ckeditor5-basic-styles/docs/features/basic-styles.md
  37. 45 0
      packages/ckeditor5-basic-styles/lang/translations/tk.po
  38. 4 4
      packages/ckeditor5-basic-styles/lang/translations/ug.po
  39. 10 9
      packages/ckeditor5-basic-styles/package.json
  40. 16 0
      packages/ckeditor5-basic-styles/src/code/codeediting.js
  41. 35 0
      packages/ckeditor5-basic-styles/tests/code/codeediting.js
  42. 4 0
      packages/ckeditor5-basic-styles/theme/code.css
  43. 21 0
      packages/ckeditor5-block-quote/lang/translations/tk.po
  44. 1 1
      packages/ckeditor5-block-quote/lang/translations/ug.po
  45. 14 14
      packages/ckeditor5-block-quote/package.json
  46. 7 4
      packages/ckeditor5-block-quote/src/blockquoteediting.js
  47. 1 1
      packages/ckeditor5-build-balloon-block/build/ckeditor.js
  48. 1 1
      packages/ckeditor5-build-balloon-block/build/ckeditor.js.map
  49. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/af.js
  50. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ar.js
  51. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ast.js
  52. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/az.js
  53. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/bg.js
  54. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ca.js
  55. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/cs.js
  56. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/da.js
  57. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/de-ch.js
  58. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/de.js
  59. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/el.js
  60. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/en-au.js
  61. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/en-gb.js
  62. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/eo.js
  63. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/es.js
  64. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/et.js
  65. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/eu.js
  66. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/fa.js
  67. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/fi.js
  68. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/fr.js
  69. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/gl.js
  70. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/gu.js
  71. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/he.js
  72. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/hr.js
  73. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/hu.js
  74. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/id.js
  75. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/it.js
  76. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ja.js
  77. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/km.js
  78. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/kn.js
  79. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ko.js
  80. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ku.js
  81. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/lt.js
  82. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/lv.js
  83. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ms.js
  84. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/nb.js
  85. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ne.js
  86. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/nl.js
  87. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/no.js
  88. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/oc.js
  89. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/pl.js
  90. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/pt-br.js
  91. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/pt.js
  92. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ro.js
  93. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/ru.js
  94. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/si.js
  95. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/sk.js
  96. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/sl.js
  97. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/sq.js
  98. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/sr-latn.js
  99. 1 1
      packages/ckeditor5-build-balloon-block/build/translations/sr.js
  100. 0 0
      packages/ckeditor5-build-balloon-block/build/translations/sv.js

文件差异内容过多而无法显示
+ 180 - 1
CHANGELOG.md


+ 1 - 1
docs/_snippets/examples/inline-editor.html

@@ -9,7 +9,7 @@
 
 		<h4>Valletta</h4>
 
-		<figure class="image image-style-align-right">
+		<figure class="image image-style-align-right" style="width: 50%;">
 			<img alt="Picture of a sunlit facade of a Maltan building." src="%BASE_PATH%/assets/img/malta.jpg">
 			<figcaption>It's siesta time in Valletta.</figcaption>
 		</figure>

+ 29 - 2
docs/_snippets/examples/inline-editor.js

@@ -6,15 +6,42 @@
 /* globals console, window, document */
 
 import InlineEditor from '@ckeditor/ckeditor5-build-inline/src/ckeditor';
+import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize';
 import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
 
 const inlineInjectElements = document.querySelectorAll( '#snippet-inline-editor [data-inline-inject]' );
 
 Array.from( inlineInjectElements ).forEach( inlineElement => {
 	const config = {
+		extraPlugins: [ ImageResize ],
 		image: {
-			toolbar: [ 'imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight' ],
-			styles: [ 'full', 'alignLeft', 'alignRight' ]
+			resizeOptions: [
+				{
+					name: 'imageResize:original',
+					label: 'Original',
+					value: null
+				},
+				{
+					name: 'imageResize:50',
+					label: '50%',
+					value: '50'
+				},
+				{
+					name: 'imageResize:75',
+					label: '75%',
+					value: '75'
+				}
+			],
+			styles: [ 'full', 'alignLeft', 'alignRight' ],
+			toolbar: [
+				'imageStyle:alignLeft',
+				'imageStyle:full',
+				'imageStyle:alignRight',
+				'|',
+				'imageResize',
+				'|',
+				'imageTextAlternative'
+			]
 		},
 		toolbar: {
 			viewportTopOffset: window.getViewportTopOffsetConfig()

+ 2 - 6
docs/_snippets/framework/tutorials/using-react-in-widget.js

@@ -114,17 +114,13 @@ class ProductPreviewEditing extends Plugin {
 
 				// The inner <div class="product__react-wrapper"></div> element.
 				// This element will host a React <ProductPreview /> component.
-				const reactWrapper = viewWriter.createUIElement( 'div', {
+				const reactWrapper = viewWriter.createRawElement( 'div', {
 					class: 'product__react-wrapper'
-				}, function( domDocument ) {
-					const domElement = this.toDomElement( domDocument );
-
+				}, function( domElement ) {
 					// This the place where React renders the actual product preview hosted
 					// by a UIElement in the view. you are using a function (renderer) passed as
 					// editor.config.products#productRenderer.
 					renderProduct( id, domElement );
-
-					return domElement;
 				} );
 
 				viewWriter.insert( viewWriter.createPositionAt( section, 0 ), reactWrapper );

+ 10 - 3
docs/builds/guides/development/custom-builds.md

@@ -35,16 +35,23 @@ In order to start developing CKEditor 5 you will require:
 
 ## Forking an existing build
 
-Start with [forking](https://help.github.com/articles/fork-a-repo/) one of the official builds (it will serve as the starting point for your custom one) and then clone your fork:
+Start with [forking](https://help.github.com/articles/fork-a-repo/) [the main `ckeditor5` repository](https://github.com/ckeditor/ckeditor5) (it will serve as the starting point for your customizations) and then clone your fork:
 
 ```bash
-git clone -b stable git@github.com:<your-username>/ckeditor5-build-classic.git
+git clone -b stable git@github.com:<your-username>/ckeditor5.git
+```
+
+Builds are available in the `packages/` directory. The directories are named `ckeditor5-build-*`.
+For example, use the following command to get to the classic build:
+
+```bash
+cd packages/ckeditor5-build-classic
 ```
 
 To make updating easier you may optionally add the original build repository to your Git remotes:
 
 ```bash
-git remote add upstream https://github.com/ckeditor/ckeditor5-build-classic.git
+git remote add upstream https://github.com/ckeditor/ckeditor5.git
 ```
 
 <info-box hint>

文件差异内容过多而无法显示
+ 5 - 5
docs/builds/guides/integration/advanced-setup.md


+ 137 - 138
docs/builds/guides/integration/content-styles.md

@@ -46,14 +46,15 @@ The content in the front–end of your application should now look the same as w
 
 Below there is a full list of content styles used by the editor features. You can copy it and use straight in your project. **Make sure to add the `ck-content` class to your content container for the styles to work** ([see above](#sharing-content-styles-between-frontend-and-backend)).
 
-```css
 /*
- * CKEditor 5 (v19.1.1) content styles.
- * Generated on Fri, 19 Jun 2020 01:26:44 GMT.
+ * CKEditor 5 (v21.0.0) content styles.
+ * Generated on Wed, 29 Jul 2020 12:14:43 GMT.
  * For more information, check out https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/content-styles.html
  */
 
 :root {
+	--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);
+	--ck-color-mention-text: hsl(341, 100%, 30%);
 	--ck-highlight-marker-blue: hsl(201, 97%, 72%);
 	--ck-highlight-marker-green: hsl(120, 93%, 68%);
 	--ck-highlight-marker-pink: hsl(345, 96%, 73%);
@@ -64,6 +65,81 @@ Below there is a full list of content styles used by the editor features. You ca
 	--ck-todo-list-checkmark-size: 16px;
 }
 
+/* ckeditor5-image/theme/image.css */
+.ck-content .image {
+	display: table;
+	clear: both;
+	text-align: center;
+	margin: 1em auto;
+}
+/* ckeditor5-image/theme/image.css */
+.ck-content .image img {
+	display: block;
+	margin: 0 auto;
+	max-width: 100%;
+	min-width: 50px;
+}
+/* ckeditor5-image/theme/imagecaption.css */
+.ck-content .image > figcaption {
+	display: table-caption;
+	caption-side: bottom;
+	word-break: break-word;
+	color: hsl(0, 0%, 20%);
+	background-color: hsl(0, 0%, 97%);
+	padding: .6em;
+	font-size: .75em;
+	outline-offset: -1px;
+}
+/* ckeditor5-image/theme/imageresize.css */
+.ck-content .image.image_resized {
+	max-width: 100%;
+	display: block;
+	box-sizing: border-box;
+}
+/* ckeditor5-image/theme/imageresize.css */
+.ck-content .image.image_resized img {
+	width: 100%;
+}
+/* ckeditor5-image/theme/imageresize.css */
+.ck-content .image.image_resized > figcaption {
+	display: block;
+}
+/* ckeditor5-image/theme/imagestyle.css */
+.ck-content .image-style-side {
+	float: right;
+	margin-left: var(--ck-image-style-spacing);
+	max-width: 50%;
+}
+/* ckeditor5-image/theme/imagestyle.css */
+.ck-content .image-style-align-left {
+	float: left;
+	margin-right: var(--ck-image-style-spacing);
+}
+/* ckeditor5-image/theme/imagestyle.css */
+.ck-content .image-style-align-center {
+	margin-left: auto;
+	margin-right: auto;
+}
+/* ckeditor5-image/theme/imagestyle.css */
+.ck-content .image-style-align-right {
+	float: right;
+	margin-left: var(--ck-image-style-spacing);
+}
+/* ckeditor5-block-quote/theme/blockquote.css */
+.ck-content blockquote {
+	overflow: hidden;
+	padding-right: 1.5em;
+	padding-left: 1.5em;
+	margin-left: 0;
+	margin-right: 0;
+	font-style: italic;
+	border-left: solid 5px hsl(0, 0%, 80%);
+}
+/* ckeditor5-block-quote/theme/blockquote.css */
+.ck-content[dir="rtl"] blockquote {
+	border-left: 0;
+	border-right: solid 5px hsl(0, 0%, 80%);
+}
 /* ckeditor5-list/theme/todolist.css */
 .ck-content .todo-list {
 	list-style: none;
@@ -131,12 +207,54 @@ Below there is a full list of content styles used by the editor features. You ca
 .ck-content .todo-list .todo-list__label .todo-list__label__description {
 	vertical-align: middle;
 }
-/* ckeditor5-media-embed/theme/mediaembed.css */
-.ck-content .media {
-	clear: both;
-	margin: 1em 0;
-	display: block;
-	min-width: 15em;
+/* ckeditor5-horizontal-line/theme/horizontalline.css */
+.ck-content hr {
+	margin: 15px 0;
+	height: 4px;
+	background: hsl(0, 0%, 87%);
+	border: 0;
+}
+/* ckeditor5-highlight/theme/highlight.css */
+.ck-content .marker-yellow {
+	background-color: var(--ck-highlight-marker-yellow);
+}
+/* ckeditor5-highlight/theme/highlight.css */
+.ck-content .marker-green {
+	background-color: var(--ck-highlight-marker-green);
+}
+/* ckeditor5-highlight/theme/highlight.css */
+.ck-content .marker-pink {
+	background-color: var(--ck-highlight-marker-pink);
+}
+/* ckeditor5-highlight/theme/highlight.css */
+.ck-content .marker-blue {
+	background-color: var(--ck-highlight-marker-blue);
+}
+/* ckeditor5-highlight/theme/highlight.css */
+.ck-content .pen-red {
+	color: var(--ck-highlight-pen-red);
+	background-color: transparent;
+}
+/* ckeditor5-highlight/theme/highlight.css */
+.ck-content .pen-green {
+	color: var(--ck-highlight-pen-green);
+	background-color: transparent;
+}
+/* ckeditor5-font/theme/fontsize.css */
+.ck-content .text-tiny {
+	font-size: .7em;
+}
+/* ckeditor5-font/theme/fontsize.css */
+.ck-content .text-small {
+	font-size: .85em;
+}
+/* ckeditor5-font/theme/fontsize.css */
+.ck-content .text-big {
+	font-size: 1.4em;
+}
+/* ckeditor5-font/theme/fontsize.css */
+.ck-content .text-huge {
+	font-size: 1.8em;
 }
 /* ckeditor5-basic-styles/theme/code.css */
 .ck-content code {
@@ -144,21 +262,6 @@ Below there is a full list of content styles used by the editor features. You ca
 	padding: .15em;
 	border-radius: 2px;
 }
-/* ckeditor5-block-quote/theme/blockquote.css */
-.ck-content blockquote {
-	overflow: hidden;
-	padding-right: 1.5em;
-	padding-left: 1.5em;
-	margin-left: 0;
-	margin-right: 0;
-	font-style: italic;
-	border-left: solid 5px hsl(0, 0%, 80%);
-}
-/* ckeditor5-block-quote/theme/blockquote.css */
-.ck-content[dir="rtl"] blockquote {
-	border-left: 0;
-	border-right: solid 5px hsl(0, 0%, 80%);
-}
 /* ckeditor5-table/theme/table.css */
 .ck-content .table {
 	margin: 1em auto;
@@ -192,98 +295,6 @@ Below there is a full list of content styles used by the editor features. You ca
 .ck-content[dir="ltr"] .table th {
 	text-align: left;
 }
-/* ckeditor5-image/theme/imageresize.css */
-.ck-content .image.image_resized {
-	max-width: 100%;
-	display: block;
-	box-sizing: border-box;
-}
-/* ckeditor5-image/theme/imageresize.css */
-.ck-content .image.image_resized img {
-	width: 100%;
-}
-/* ckeditor5-image/theme/imageresize.css */
-.ck-content .image.image_resized > figcaption {
-	display: block;
-}
-/* ckeditor5-image/theme/image.css */
-.ck-content .image {
-	display: table;
-	clear: both;
-	text-align: center;
-	margin: 1em auto;
-}
-/* ckeditor5-image/theme/image.css */
-.ck-content .image img {
-	display: block;
-	margin: 0 auto;
-	max-width: 100%;
-	min-width: 50px;
-}
-/* ckeditor5-image/theme/imagecaption.css */
-.ck-content .image > figcaption {
-	display: table-caption;
-	caption-side: bottom;
-	word-break: break-word;
-	color: hsl(0, 0%, 20%);
-	background-color: hsl(0, 0%, 97%);
-	padding: .6em;
-	font-size: .75em;
-	outline-offset: -1px;
-}
-/* ckeditor5-highlight/theme/highlight.css */
-.ck-content .marker-yellow {
-	background-color: var(--ck-highlight-marker-yellow);
-}
-/* ckeditor5-highlight/theme/highlight.css */
-.ck-content .marker-green {
-	background-color: var(--ck-highlight-marker-green);
-}
-/* ckeditor5-highlight/theme/highlight.css */
-.ck-content .marker-pink {
-	background-color: var(--ck-highlight-marker-pink);
-}
-/* ckeditor5-highlight/theme/highlight.css */
-.ck-content .marker-blue {
-	background-color: var(--ck-highlight-marker-blue);
-}
-/* ckeditor5-highlight/theme/highlight.css */
-.ck-content .pen-red {
-	color: var(--ck-highlight-pen-red);
-	background-color: transparent;
-}
-/* ckeditor5-highlight/theme/highlight.css */
-.ck-content .pen-green {
-	color: var(--ck-highlight-pen-green);
-	background-color: transparent;
-}
-/* ckeditor5-image/theme/imagestyle.css */
-.ck-content .image-style-side,
-.ck-content .image-style-align-left,
-.ck-content .image-style-align-center,
-.ck-content .image-style-align-right {
-	max-width: 50%;
-}
-/* ckeditor5-image/theme/imagestyle.css */
-.ck-content .image-style-side {
-	float: right;
-	margin-left: var(--ck-image-style-spacing);
-}
-/* ckeditor5-image/theme/imagestyle.css */
-.ck-content .image-style-align-left {
-	float: left;
-	margin-right: var(--ck-image-style-spacing);
-}
-/* ckeditor5-image/theme/imagestyle.css */
-.ck-content .image-style-align-center {
-	margin-left: auto;
-	margin-right: auto;
-}
-/* ckeditor5-image/theme/imagestyle.css */
-.ck-content .image-style-align-right {
-	float: right;
-	margin-left: var(--ck-image-style-spacing);
-}
 /* ckeditor5-page-break/theme/pagebreak.css */
 .ck-content .page-break {
 	position: relative;
@@ -320,21 +331,12 @@ Below there is a full list of content styles used by the editor features. You ca
 	-ms-user-select: none;
 	user-select: none;
 }
-/* ckeditor5-font/theme/fontsize.css */
-.ck-content .text-tiny {
-	font-size: .7em;
-}
-/* ckeditor5-font/theme/fontsize.css */
-.ck-content .text-small {
-	font-size: .85em;
-}
-/* ckeditor5-font/theme/fontsize.css */
-.ck-content .text-big {
-	font-size: 1.4em;
-}
-/* ckeditor5-font/theme/fontsize.css */
-.ck-content .text-huge {
-	font-size: 1.8em;
+/* ckeditor5-media-embed/theme/mediaembed.css */
+.ck-content .media {
+	clear: both;
+	margin: 1em 0;
+	display: block;
+	min-width: 15em;
 }
 /* ckeditor5-code-block/theme/codeblock.css */
 .ck-content pre {
@@ -356,12 +358,10 @@ Below there is a full list of content styles used by the editor features. You ca
 	padding: 0;
 	border-radius: 0;
 }
-/* ckeditor5-horizontal-line/theme/horizontalline.css */
-.ck-content hr {
-	margin: 15px 0;
-	height: 4px;
-	background: hsl(0, 0%, 87%);
-	border: 0;
+/* ckeditor5-mention/theme/mention.css */
+.ck-content .mention {
+	background: var(--ck-color-mention-background);
+	color: var(--ck-color-mention-text);
 }
 @media print {
 	/* ckeditor5-page-break/theme/pagebreak.css */
@@ -373,4 +373,3 @@ Below there is a full list of content styles used by the editor features. You ca
 		display: none;
 	}
 }
-```

+ 3 - 2
docs/builds/guides/integration/installing-plugins.md

@@ -34,8 +34,9 @@ Adding plugins to existing builds is done through their customization. Editor bu
 4. Bundle the build.
 
 ```bash
-git clone -b stable https://github.com/ckeditor/ckeditor5-build-classic.git
-cd ckeditor5-build-classic
+git clone -b stable https://github.com/ckeditor/ckeditor5
+
+cd ckeditor5/packages/ckeditor5-build-classic
 npm install
 ```
 

+ 1 - 1
docs/builds/guides/migrate.md

@@ -118,7 +118,7 @@ Note: The number of options was reduced on purpose. We understood that configuri
 		</tr>
 		<tr>
 			<td><a href="../../../../ckeditor4/latest/api/CKEDITOR_config.html#cfg-autolink_commitKeystrokes">autolink_commitKeystrokes</a> <br> <a href="../../../../ckeditor4/latest/api/CKEDITOR_config.html#cfg-autolink_emailRegex">autolink_emailRegex</a> <br> <a href="../../../../ckeditor4/latest/api/CKEDITOR_config.html#cfg-autolink_urlRegex">autolink_urlRegex</a></td>
-			<td>N/A</td>
+			<td>Refer to the {@link features/link#autolink-feature Autolink section} of the Link guide to learn more about support for automatic linking in CKEditor 5.</td>
 		</tr>
 		<tr>
 			<td><a href="../../../../ckeditor4/latest/api/CKEDITOR_config.html#cfg-baseFloatZIndex">baseFloatZIndex</a></td>

文件差异内容过多而无法显示
+ 20 - 17
docs/framework/guides/architecture/editing-engine.md


+ 3 - 3
docs/framework/guides/architecture/ui-library.md

@@ -310,7 +310,7 @@ The dropdown panel exposes its {@link module:ui/dropdown/dropdownpanelview~Dropd
 
 The framework provides a set of helpers to make the dropdown creation process easier, although it is still possible to compose a custom dropdown from scratch using the base classes.
 
-The {@link module:ui/dropdown/utils#createDropdown} helper creates a {@link module:ui/dropdown/dropdownview~DropdownView} with either a {@link module:ui/button/buttonview~ButtonView} or a {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView}.
+The {@link module:ui/dropdown/utils~createDropdown} helper creates a {@link module:ui/dropdown/dropdownview~DropdownView} with either a {@link module:ui/button/buttonview~ButtonView} or a {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView}.
 
 ```js
 import { createDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils';
@@ -376,7 +376,7 @@ dropdownView.buttonView.set( {
 
 #### Adding a list to a dropdown
 
-The {@link module:ui/list/listview~ListView} can be added to a dropdown using the {@link module:ui/dropdown/utils#addListToDropdown} helper.
+The {@link module:ui/list/listview~ListView} can be added to a dropdown using the {@link module:ui/dropdown/utils~addListToDropdown} helper.
 
 ```js
 import Model from '@ckeditor/ckeditor5-ui/src/model';
@@ -411,7 +411,7 @@ addListToDropdown( dropdownView, items );
 
 #### Adding a toolbar to a dropdown
 
-A {@link module:ui/toolbar/toolbarview~ToolbarView} can be added to a dropdown using  the {@link module:ui/dropdown/utils#addToolbarToDropdown} helper.
+A {@link module:ui/toolbar/toolbarview~ToolbarView} can be added to a dropdown using  the {@link module:ui/dropdown/utils~addToolbarToDropdown} helper.
 
 ```js
 import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';

+ 3 - 1
docs/framework/guides/contributing/development-environment.md

@@ -95,7 +95,9 @@ This task accepts the following arguments:
 
 * `--skip-api` &ndash; Skips building the API documentation (which takes the majority of the total time).
 * `--skip-snippets` &ndash; Skips building live snippets.
-* `--snippets=snippet-name` &ndash; Whitelists snippets to build (accepts glob patterns).
+* `--snippets=snippet-name` &ndash; Snippets to build (accepts glob patterns). If a snippet that you want to build uses another snippet as a source that provides an editor instance, you need to specify both snippets. See examples:
+    - `--snippets=features/*` - all snippets that starts with `features/` in their names will be built,
+    - `--snippets=classic-editor,build-classic-source` - all snippets that contains the specified strings in their names will be built.
 * `--skip-validation` &ndash; Skips the final link validation.
 * `--watch` &ndash; Runs the documentation generator in a watch mode. It covers guides but it does not cover API docs.
 * `--production` &ndash; Minifies the assets and performs other actions which are unnecessary during CKEditor 5 development.

+ 1 - 1
docs/framework/guides/deep-dive/localization.md

@@ -149,7 +149,7 @@ Adding translations to the editor can be done in three ways to satisfy various n
 
 ### Using the `add()` function
 
-The first option for adding translations is via {@link module:utils/translation-service.add the translation-service's `add()` helper}. This utility adds translations to the global `window.CKEDITOR_TRANSLATIONS` object by extending it. Since it needs to be imported, it works only before building the editor.
+The first option for adding translations is via {@link module:utils/translation-service~add the translation-service's `add()` helper}. This utility adds translations to the global `window.CKEDITOR_TRANSLATIONS` object by extending it. Since it needs to be imported, it works only before building the editor.
 
 Starting with the CKEditor 5 v19.0.0 release, the `add()` method now accepts an optional `getPluralForm()` function as the third argument. This function is only needed for defining the plural form if no language file was loaded for a particular language. It also accepts an array of translations for a *message* if the *message* should support singular and plural forms.
 

+ 1 - 1
docs/framework/guides/development-tools.md

@@ -90,7 +90,7 @@ They allow for "stringifying" the {@link framework/guides/architecture/editing-e
 	Both tools are designed for prototyping, debugging, and testing purposes. Do not use them in production-grade code.
 </info-box>
 
-For instance, to take a peek at the editor model, you could use the {@link module:engine/dev-utils/model#static-function-getData `getData()`} helper:
+For instance, to take a peek at the editor model, you could use the {@link module:engine/dev-utils/model~getData `getData()`} helper:
 
 ```js
 import { getData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';

+ 4 - 12
docs/framework/guides/tutorials/using-react-in-a-widget.md

@@ -365,17 +365,13 @@ export default class ProductPreviewEditing extends Plugin {
 
 				// The inner <div class="product__react-wrapper"></div> element.
 				// This element will host a React <ProductPreview /> component.
-				const reactWrapper = viewWriter.createUIElement( 'div', {
+				const reactWrapper = viewWriter.createRawElement( 'div', {
 					class: 'product__react-wrapper'
-				}, function( domDocument ) {
-					const domElement = this.toDomElement( domDocument );
-
+				}, function( domElement ) {
 					// This the place where React renders the actual product preview hosted
 					// by a UIElement in the view. You are using a function (renderer) passed as
 					// editor.config.products#productRenderer.
 					renderProduct( id, domElement );
-
-					return domElement;
 				} );
 
 				viewWriter.insert( viewWriter.createPositionAt( section, 0 ), reactWrapper );
@@ -1184,17 +1180,13 @@ export default class ProductPreviewEditing extends Plugin {
 
 				// The inner <div class="product__react-wrapper"></div> element.
 				// This element will host a React <ProductPreview /> component.
-				const reactWrapper = viewWriter.createUIElement( 'div', {
+				const reactWrapper = viewWriter.createRawElement( 'div', {
 					class: 'product__react-wrapper'
-				}, function( domDocument ) {
-					const domElement = this.toDomElement( domDocument );
-
+				}, function( domElement ) {
 					// This the place where React renders the actual product preview hosted
 					// by a UIElement in the view. You are using a function (renderer) passed as
 					// editor.config.products#productRenderer.
 					renderProduct( id, domElement );
-
-					return domElement;
 				} );
 
 				viewWriter.insert( viewWriter.createPositionAt( section, 0 ), reactWrapper );

+ 63 - 63
package.json

@@ -1,6 +1,6 @@
 {
   "name": "ckeditor5",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "The development environment of CKEditor 5 – the best browser-based rich text editor.",
   "private": true,
   "keywords": [
@@ -21,71 +21,71 @@
     "framework"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor-cloud-services-core": "^20.0.0",
-    "@ckeditor/ckeditor5-adapter-ckfinder": "^20.0.0",
-    "@ckeditor/ckeditor5-alignment": "^20.0.0",
-    "@ckeditor/ckeditor5-autoformat": "^20.0.0",
-    "@ckeditor/ckeditor5-autosave": "^20.0.0",
-    "@ckeditor/ckeditor5-basic-styles": "^20.0.0",
-    "@ckeditor/ckeditor5-block-quote": "^20.0.0",
-    "@ckeditor/ckeditor5-build-balloon": "^20.0.0",
-    "@ckeditor/ckeditor5-build-balloon-block": "^20.0.0",
-    "@ckeditor/ckeditor5-build-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-build-decoupled-document": "^20.0.0",
-    "@ckeditor/ckeditor5-build-inline": "^20.0.0",
-    "@ckeditor/ckeditor5-ckfinder": "^20.0.0",
-    "@ckeditor/ckeditor5-clipboard": "^20.0.0",
-    "@ckeditor/ckeditor5-cloud-services": "^20.0.0",
-    "@ckeditor/ckeditor5-code-block": "^20.0.0",
-    "@ckeditor/ckeditor5-core": "^20.0.0",
-    "@ckeditor/ckeditor5-easy-image": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-balloon": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-decoupled": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-inline": "^20.0.0",
-    "@ckeditor/ckeditor5-engine": "^20.0.0",
-    "@ckeditor/ckeditor5-enter": "^20.0.0",
-    "@ckeditor/ckeditor5-essentials": "^20.0.0",
-    "@ckeditor/ckeditor5-font": "^20.0.0",
-    "@ckeditor/ckeditor5-heading": "^20.0.0",
-    "@ckeditor/ckeditor5-highlight": "^20.0.0",
-    "@ckeditor/ckeditor5-horizontal-line": "^20.0.0",
-    "@ckeditor/ckeditor5-image": "^20.0.0",
-    "@ckeditor/ckeditor5-indent": "^20.0.0",
-    "@ckeditor/ckeditor5-link": "^20.0.0",
-    "@ckeditor/ckeditor5-list": "^20.0.0",
-    "@ckeditor/ckeditor5-markdown-gfm": "^20.0.0",
-    "@ckeditor/ckeditor5-media-embed": "^20.0.0",
-    "@ckeditor/ckeditor5-mention": "^20.0.0",
-    "@ckeditor/ckeditor5-page-break": "^20.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^20.0.0",
-    "@ckeditor/ckeditor5-paste-from-office": "^20.0.0",
-    "@ckeditor/ckeditor5-remove-format": "^20.0.0",
-    "@ckeditor/ckeditor5-restricted-editing": "^20.0.0",
-    "@ckeditor/ckeditor5-select-all": "^20.0.0",
-    "@ckeditor/ckeditor5-special-characters": "^20.0.0",
-    "@ckeditor/ckeditor5-table": "^20.0.0",
-    "@ckeditor/ckeditor5-theme-lark": "^20.0.0",
-    "@ckeditor/ckeditor5-typing": "^20.0.0",
-    "@ckeditor/ckeditor5-ui": "^20.0.0",
-    "@ckeditor/ckeditor5-undo": "^20.0.0",
-    "@ckeditor/ckeditor5-upload": "^20.0.0",
-    "@ckeditor/ckeditor5-utils": "^20.0.0",
-    "@ckeditor/ckeditor5-watchdog": "^20.0.0",
-    "@ckeditor/ckeditor5-widget": "^20.0.0",
-    "@ckeditor/ckeditor5-word-count": "^20.0.0"
+    "@ckeditor/ckeditor-cloud-services-core": "^21.0.0",
+    "@ckeditor/ckeditor5-adapter-ckfinder": "^21.0.0",
+    "@ckeditor/ckeditor5-alignment": "^21.0.0",
+    "@ckeditor/ckeditor5-autoformat": "^21.0.0",
+    "@ckeditor/ckeditor5-autosave": "^21.0.0",
+    "@ckeditor/ckeditor5-basic-styles": "^21.0.0",
+    "@ckeditor/ckeditor5-block-quote": "^21.0.0",
+    "@ckeditor/ckeditor5-build-balloon": "^21.0.0",
+    "@ckeditor/ckeditor5-build-balloon-block": "^21.0.0",
+    "@ckeditor/ckeditor5-build-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-build-decoupled-document": "^21.0.0",
+    "@ckeditor/ckeditor5-build-inline": "^21.0.0",
+    "@ckeditor/ckeditor5-ckfinder": "^21.0.0",
+    "@ckeditor/ckeditor5-clipboard": "^21.0.0",
+    "@ckeditor/ckeditor5-cloud-services": "^21.0.0",
+    "@ckeditor/ckeditor5-code-block": "^21.0.0",
+    "@ckeditor/ckeditor5-core": "^21.0.0",
+    "@ckeditor/ckeditor5-easy-image": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-balloon": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-decoupled": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-inline": "^21.0.0",
+    "@ckeditor/ckeditor5-engine": "^21.0.0",
+    "@ckeditor/ckeditor5-enter": "^21.0.0",
+    "@ckeditor/ckeditor5-essentials": "^21.0.0",
+    "@ckeditor/ckeditor5-font": "^21.0.0",
+    "@ckeditor/ckeditor5-heading": "^21.0.0",
+    "@ckeditor/ckeditor5-highlight": "^21.0.0",
+    "@ckeditor/ckeditor5-horizontal-line": "^21.0.0",
+    "@ckeditor/ckeditor5-image": "^21.0.0",
+    "@ckeditor/ckeditor5-indent": "^21.0.0",
+    "@ckeditor/ckeditor5-link": "^21.0.0",
+    "@ckeditor/ckeditor5-list": "^21.0.0",
+    "@ckeditor/ckeditor5-markdown-gfm": "^21.0.0",
+    "@ckeditor/ckeditor5-media-embed": "^21.0.0",
+    "@ckeditor/ckeditor5-mention": "^21.0.0",
+    "@ckeditor/ckeditor5-page-break": "^21.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^21.0.0",
+    "@ckeditor/ckeditor5-paste-from-office": "^21.0.0",
+    "@ckeditor/ckeditor5-remove-format": "^21.0.0",
+    "@ckeditor/ckeditor5-restricted-editing": "^21.0.0",
+    "@ckeditor/ckeditor5-select-all": "^21.0.0",
+    "@ckeditor/ckeditor5-special-characters": "^21.0.0",
+    "@ckeditor/ckeditor5-table": "^21.0.0",
+    "@ckeditor/ckeditor5-theme-lark": "^21.0.0",
+    "@ckeditor/ckeditor5-typing": "^21.0.0",
+    "@ckeditor/ckeditor5-ui": "^21.0.0",
+    "@ckeditor/ckeditor5-undo": "^21.0.0",
+    "@ckeditor/ckeditor5-upload": "^21.0.0",
+    "@ckeditor/ckeditor5-utils": "^21.0.0",
+    "@ckeditor/ckeditor5-watchdog": "^21.0.0",
+    "@ckeditor/ckeditor5-widget": "^21.0.0",
+    "@ckeditor/ckeditor5-word-count": "^21.0.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-comments": "^20.0.0",
-    "@ckeditor/ckeditor5-dev-docs": "^21.0.0",
-    "@ckeditor/ckeditor5-dev-env": "^21.0.0",
-    "@ckeditor/ckeditor5-dev-tests": "^21.0.0",
-    "@ckeditor/ckeditor5-dev-utils": "^21.0.0",
-    "@ckeditor/ckeditor5-dev-webpack-plugin": "^21.0.0",
+    "@ckeditor/ckeditor5-comments": "^21.0.0",
+    "@ckeditor/ckeditor5-dev-docs": "^23.0.0",
+    "@ckeditor/ckeditor5-dev-env": "^23.0.0",
+    "@ckeditor/ckeditor5-dev-tests": "^23.0.0",
+    "@ckeditor/ckeditor5-dev-utils": "^23.0.0",
+    "@ckeditor/ckeditor5-dev-webpack-plugin": "^23.0.0",
     "@ckeditor/ckeditor5-inspector": "^2.1.0",
     "@ckeditor/ckeditor5-react": "^2.1.0",
-    "@ckeditor/ckeditor5-real-time-collaboration": "^20.0.0",
-    "@ckeditor/ckeditor5-track-changes": "^20.0.0",
+    "@ckeditor/ckeditor5-real-time-collaboration": "^21.0.0",
+    "@ckeditor/ckeditor5-track-changes": "^21.0.0",
     "@wiris/mathtype-ckeditor5": "7.20.0",
     "babel-standalone": "^6.26.0",
     "coveralls": "^3.1.0",
@@ -110,7 +110,7 @@
     "stylelint-config-ckeditor5": "^2.0.0",
     "svgo": "^1.3.2",
     "terser-webpack-plugin": "^3.0.2",
-    "umberto": "^1.4.1",
+    "umberto": "^1.5.2",
     "webpack": "^4.43.0"
   },
   "engines": {

+ 2 - 2
packages/ckeditor-cloud-services-core/package.json

@@ -1,13 +1,13 @@
 {
   "name": "@ckeditor/ckeditor-cloud-services-core",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "CKEditor Cloud Services Core API.",
   "keywords": [
     "ckeditor5",
     "ckeditor5-lib"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-utils": "^20.0.0"
+    "@ckeditor/ckeditor5-utils": "^21.0.0"
   },
   "engines": {
     "node": ">=12.0.0",

+ 21 - 0
packages/ckeditor5-adapter-ckfinder/lang/translations/tk.po

@@ -0,0 +1,21 @@
+# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+#
+#                                     !!! IMPORTANT !!!
+#
+#         Before you edit this file, please keep in mind that contributing to the project
+#                translations is possible ONLY via the Transifex online service.
+#
+#         To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
+#
+#                   To learn more, check out the official contributor's guide:
+#     https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
+#
+msgid ""
+msgstr ""
+"Language-Team: Turkmen (https://www.transifex.com/ckeditor/teams/11143/tk/)\n"
+"Language: tk\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "A generic error message displayed on upload failure. The file name is concatenated to this text."
+msgid "Cannot upload file:"
+msgstr "Faýl ýükläp bolmady:"

+ 13 - 13
packages/ckeditor5-adapter-ckfinder/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ckeditor/ckeditor5-adapter-ckfinder",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "CKFinder adapter for CKEditor 5.",
   "keywords": [
     "ckeditor",
@@ -10,20 +10,20 @@
     "ckeditor5-plugin"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^20.0.0",
-    "@ckeditor/ckeditor5-upload": "^20.0.0"
+    "@ckeditor/ckeditor5-core": "^21.0.0",
+    "@ckeditor/ckeditor5-upload": "^21.0.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-basic-styles": "^20.0.0",
-    "@ckeditor/ckeditor5-clipboard": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-enter": "^20.0.0",
-    "@ckeditor/ckeditor5-heading": "^20.0.0",
-    "@ckeditor/ckeditor5-image": "^20.0.0",
-    "@ckeditor/ckeditor5-list": "^20.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^20.0.0",
-    "@ckeditor/ckeditor5-typing": "^20.0.0",
-    "@ckeditor/ckeditor5-undo": "^20.0.0"
+    "@ckeditor/ckeditor5-basic-styles": "^21.0.0",
+    "@ckeditor/ckeditor5-clipboard": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-enter": "^21.0.0",
+    "@ckeditor/ckeditor5-heading": "^21.0.0",
+    "@ckeditor/ckeditor5-image": "^21.0.0",
+    "@ckeditor/ckeditor5-list": "^21.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^21.0.0",
+    "@ckeditor/ckeditor5-typing": "^21.0.0",
+    "@ckeditor/ckeditor5-undo": "^21.0.0"
   },
   "engines": {
     "node": ">=12.0.0",

+ 41 - 0
packages/ckeditor5-alignment/lang/translations/tk.po

@@ -0,0 +1,41 @@
+# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+#
+#                                     !!! IMPORTANT !!!
+#
+#         Before you edit this file, please keep in mind that contributing to the project
+#                translations is possible ONLY via the Transifex online service.
+#
+#         To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
+#
+#                   To learn more, check out the official contributor's guide:
+#     https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
+#
+msgid ""
+msgstr ""
+"Language-Team: Turkmen (https://www.transifex.com/ckeditor/teams/11143/tk/)\n"
+"Language: tk\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "Toolbar button tooltip for aligning the text to the left."
+msgid "Align left"
+msgstr "Çepe deňleşdiriň"
+
+msgctxt "Toolbar button tooltip for aligning the text to the right."
+msgid "Align right"
+msgstr "Saga deňleşdiriň"
+
+msgctxt "Toolbar button tooltip for aligning the text to center."
+msgid "Align center"
+msgstr "Merkeze deňleşdir"
+
+msgctxt "Toolbar button tooltip for making the text justified."
+msgid "Justify"
+msgstr "Akla"
+
+msgctxt "Dropdown button tooltip for the text alignment feature."
+msgid "Text alignment"
+msgstr "Tekstiň deňleşdirilmegi"
+
+msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
+msgid "Text alignment toolbar"
+msgstr "Teksti deňleşdirmek gurallar paneli"

+ 41 - 0
packages/ckeditor5-alignment/lang/translations/ug.po

@@ -0,0 +1,41 @@
+# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+#
+#                                     !!! IMPORTANT !!!
+#
+#         Before you edit this file, please keep in mind that contributing to the project
+#                translations is possible ONLY via the Transifex online service.
+#
+#         To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
+#
+#                   To learn more, check out the official contributor's guide:
+#     https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
+#
+msgid ""
+msgstr ""
+"Language-Team: Uyghur (https://www.transifex.com/ckeditor/teams/11143/ug/)\n"
+"Language: ug\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "Toolbar button tooltip for aligning the text to the left."
+msgid "Align left"
+msgstr "سولغا توغرىلاش"
+
+msgctxt "Toolbar button tooltip for aligning the text to the right."
+msgid "Align right"
+msgstr "ئوڭغا توغرىلاش"
+
+msgctxt "Toolbar button tooltip for aligning the text to center."
+msgid "Align center"
+msgstr "ئوتتۇرىغا توغرىلاش"
+
+msgctxt "Toolbar button tooltip for making the text justified."
+msgid "Justify"
+msgstr "تەكشىلەش"
+
+msgctxt "Dropdown button tooltip for the text alignment feature."
+msgid "Text alignment"
+msgstr "تېكىست توغرىلاش"
+
+msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
+msgid "Text alignment toolbar"
+msgstr "تېكىست توغرىلاش قورالبالدىقى"

+ 13 - 13
packages/ckeditor5-alignment/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ckeditor/ckeditor5-alignment",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "Text alignment feature for CKEditor 5.",
   "keywords": [
     "ckeditor",
@@ -10,20 +10,20 @@
     "ckeditor5-plugin"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^20.0.0",
-    "@ckeditor/ckeditor5-ui": "^20.0.0"
+    "@ckeditor/ckeditor5-core": "^21.0.0",
+    "@ckeditor/ckeditor5-ui": "^21.0.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-block-quote": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-engine": "^20.0.0",
-    "@ckeditor/ckeditor5-enter": "^20.0.0",
-    "@ckeditor/ckeditor5-heading": "^20.0.0",
-    "@ckeditor/ckeditor5-image": "^20.0.0",
-    "@ckeditor/ckeditor5-list": "^20.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^20.0.0",
-    "@ckeditor/ckeditor5-typing": "^20.0.0",
-    "@ckeditor/ckeditor5-utils": "^20.0.0"
+    "@ckeditor/ckeditor5-block-quote": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-engine": "^21.0.0",
+    "@ckeditor/ckeditor5-enter": "^21.0.0",
+    "@ckeditor/ckeditor5-heading": "^21.0.0",
+    "@ckeditor/ckeditor5-image": "^21.0.0",
+    "@ckeditor/ckeditor5-list": "^21.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^21.0.0",
+    "@ckeditor/ckeditor5-typing": "^21.0.0",
+    "@ckeditor/ckeditor5-utils": "^21.0.0"
   },
   "engines": {
     "node": ">=12.0.0",

+ 14 - 13
packages/ckeditor5-autoformat/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ckeditor/ckeditor5-autoformat",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "Autoformatting feature for CKEditor 5.",
   "keywords": [
     "ckeditor",
@@ -10,20 +10,21 @@
     "ckeditor5-plugin"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^20.0.0",
-    "@ckeditor/ckeditor5-typing": "^20.0.0"
+    "@ckeditor/ckeditor5-core": "^21.0.0",
+    "@ckeditor/ckeditor5-typing": "^21.0.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-basic-styles": "^20.0.0",
-    "@ckeditor/ckeditor5-block-quote": "^20.0.0",
-    "@ckeditor/ckeditor5-code-block": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-engine": "^20.0.0",
-    "@ckeditor/ckeditor5-enter": "^20.0.0",
-    "@ckeditor/ckeditor5-heading": "^20.0.0",
-    "@ckeditor/ckeditor5-list": "^20.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^20.0.0",
-    "@ckeditor/ckeditor5-undo": "^20.0.0"
+    "@ckeditor/ckeditor5-basic-styles": "^21.0.0",
+    "@ckeditor/ckeditor5-block-quote": "^21.0.0",
+    "@ckeditor/ckeditor5-code-block": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-engine": "^21.0.0",
+    "@ckeditor/ckeditor5-enter": "^21.0.0",
+    "@ckeditor/ckeditor5-heading": "^21.0.0",
+    "@ckeditor/ckeditor5-list": "^21.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^21.0.0",
+    "@ckeditor/ckeditor5-undo": "^21.0.0",
+    "@ckeditor/ckeditor5-utils": "^21.0.0"
   },
   "engines": {
     "node": ">=12.0.0",

+ 5 - 4
packages/ckeditor5-autoformat/src/autoformat.js

@@ -123,16 +123,17 @@ export default class Autoformat extends Plugin {
 		if ( command ) {
 			command.modelElements
 				.filter( name => name.match( /^heading[1-6]$/ ) )
-				.forEach( commandValue => {
-					const level = commandValue[ 7 ];
+				.forEach( modelName => {
+					const level = modelName[ 7 ];
 					const pattern = new RegExp( `^(#{${ level }})\\s$` );
 
 					blockAutoformatEditing( this.editor, this, pattern, () => {
-						if ( !command.isEnabled ) {
+						// Should only be active if command is enabled and heading style associated with pattern is inactive.
+						if ( !command.isEnabled || command.value === modelName ) {
 							return false;
 						}
 
-						this.editor.execute( 'heading', { value: commandValue } );
+						this.editor.execute( 'heading', { value: modelName } );
 					} );
 				} );
 		}

+ 27 - 4
packages/ckeditor5-autoformat/src/blockautoformatediting.js

@@ -2,7 +2,9 @@
  * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
+
 import LiveRange from '@ckeditor/ckeditor5-engine/src/model/liverange';
+import first from '@ckeditor/ckeditor5-utils/src/first';
 
 /**
  * The block autoformatting engine. It allows to format various block patterns. For example,
@@ -43,7 +45,8 @@ import LiveRange from '@ckeditor/ckeditor5-engine/src/model/liverange';
  *
  * @param {module:core/editor/editor~Editor} editor The editor instance.
  * @param {module:autoformat/autoformat~Autoformat} plugin The autoformat plugin instance.
- * @param {RegExp} pattern The regular expression to execute on just inserted text.
+ * @param {RegExp} pattern The regular expression to execute on just inserted text. The regular expression is tested against the text
+ * from the beginning until the caret position.
  * @param {Function|String} callbackOrCommand The callback to execute or the command to run when the text is matched.
  * In case of providing the callback, it receives the following parameter:
  * * {Object} match RegExp.exec() result of matching the pattern to inserted text.
@@ -68,6 +71,12 @@ export default function blockAutoformatEditing( editor, plugin, pattern, callbac
 			return;
 		}
 
+		const range = first( editor.model.document.selection.getRanges() );
+
+		if ( !range.isCollapsed ) {
+			return;
+		}
+
 		if ( batch.type == 'transparent' ) {
 			return;
 		}
@@ -82,12 +91,26 @@ export default function blockAutoformatEditing( editor, plugin, pattern, callbac
 
 		const blockToFormat = entry.position.parent;
 
-		// Block formatting should trigger only if the entire content of a paragraph is a single text node... (see ckeditor5#5671).
-		if ( !blockToFormat.is( 'paragraph' ) || blockToFormat.childCount !== 1 ) {
+		// Block formatting should be disabled in codeBlocks (#5800).
+		if ( blockToFormat.is( 'element', 'codeBlock' ) ) {
+			return;
+		}
+
+		// In case a command is bound, do not re-execute it over an existing block style which would result with a style removal.
+		// Instead just drop processing so that autoformat trigger text is not lost. E.g. writing "# " in a level 1 heading.
+		if ( command && command.value === true ) {
+			return;
+		}
+
+		const firstNode = blockToFormat.getChild( 0 );
+		const firstNodeRange = editor.model.createRangeOn( firstNode );
+
+		// Range is only expected to be within or at the very end of the first text node.
+		if ( !firstNodeRange.containsRange( range ) && !range.end.isEqual( firstNodeRange.end ) ) {
 			return;
 		}
 
-		const match = pattern.exec( blockToFormat.getChild( 0 ).data );
+		const match = pattern.exec( firstNode.data.substr( 0, range.end.offset ) );
 
 		// ...and this text node's data match the pattern.
 		if ( !match ) {

+ 1 - 1
packages/ckeditor5-autoformat/src/inlineautoformatediting.js

@@ -201,7 +201,7 @@ function getTextAfterCode( range, model ) {
 
 	const text = Array.from( range.getItems() ).reduce( ( rangeText, node ) => {
 		// Trim text to a last occurrence of an inline element and update range start.
-		if ( !( node.is( 'text' ) || node.is( 'textProxy' ) ) || node.getAttribute( 'code' ) ) {
+		if ( !( node.is( '$text' ) || node.is( '$textProxy' ) ) || node.getAttribute( 'code' ) ) {
 			start = model.createPositionAfter( node );
 
 			return '';

+ 71 - 8
packages/ckeditor5-autoformat/tests/autoformat.js

@@ -77,6 +77,15 @@ describe( 'Autoformat', () => {
 			expect( getData( model ) ).to.equal( '<listItem listIndent="0" listType="bulleted">[]</listItem>' );
 		} );
 
+		it( 'should replace a non-empty paragraph using the asterisk', () => {
+			setData( model, '<paragraph>*[]sample text</paragraph>' );
+			model.change( writer => {
+				writer.insertText( ' ', doc.selection.getFirstPosition() );
+			} );
+
+			expect( getData( model ) ).to.equal( '<listItem listIndent="0" listType="bulleted">[]sample text</listItem>' );
+		} );
+
 		it( 'should not replace minus character when inside bulleted list item', () => {
 			setData( model, '<listItem listIndent="0" listType="bulleted">-[]</listItem>' );
 			model.change( writer => {
@@ -115,6 +124,15 @@ describe( 'Autoformat', () => {
 			expect( getData( model ) ).to.equal( '<listItem listIndent="0" listType="numbered">[]</listItem>' );
 		} );
 
+		it( 'should replace a non-empty paragraph using the parenthesis format', () => {
+			setData( model, '<paragraph>1)[]sample text</paragraph>' );
+			model.change( writer => {
+				writer.insertText( ' ', doc.selection.getFirstPosition() );
+			} );
+
+			expect( getData( model ) ).to.equal( '<listItem listIndent="0" listType="numbered">[]sample text</listItem>' );
+		} );
+
 		it( 'should not replace digit character when there is no . or ) in the format', () => {
 			setData( model, '<paragraph>1[]</paragraph>' );
 			model.change( writer => {
@@ -150,6 +168,24 @@ describe( 'Autoformat', () => {
 
 			expect( getData( model ) ).to.equal( '<paragraph>Foo<softBreak></softBreak>1. []</paragraph>' );
 		} );
+
+		it( 'should be converted from a header', () => {
+			setData( model, '<heading1>1.[]</heading1>' );
+			model.change( writer => {
+				writer.insertText( ' ', doc.selection.getFirstPosition() );
+			} );
+
+			expect( getData( model ) ).to.equal( '<listItem listIndent="0" listType="numbered">[]</listItem>' );
+		} );
+
+		it( 'should be converted from a bulleted list', () => {
+			setData( model, '<listItem listIndent="0" listType="bulleted">1.[]</listItem>' );
+			model.change( writer => {
+				writer.insertText( ' ', doc.selection.getFirstPosition() );
+			} );
+
+			expect( getData( model ) ).to.equal( '<listItem listIndent="0" listType="numbered">[]</listItem>' );
+		} );
 	} );
 
 	describe( 'Heading', () => {
@@ -243,6 +279,15 @@ describe( 'Autoformat', () => {
 
 			expect( getData( model ) ).to.equal( '<paragraph>Foo<softBreak></softBreak># []</paragraph>' );
 		} );
+
+		it( 'should convert a header that already contains a text', () => {
+			setData( model, '<heading1>###[]foo</heading1>' );
+			model.change( writer => {
+				writer.insertText( ' ', doc.selection.getFirstPosition() );
+			} );
+
+			expect( getData( model ) ).to.equal( '<heading3>[]foo</heading3>' );
+		} );
 	} );
 
 	describe( 'Block quote', () => {
@@ -255,13 +300,22 @@ describe( 'Autoformat', () => {
 			expect( getData( model ) ).to.equal( '<blockQuote><paragraph>[]</paragraph></blockQuote>' );
 		} );
 
-		it( 'should not replace greater-than character when inside heading', () => {
+		it( 'should replace greater-than character in a non-empty paragraph', () => {
+			setData( model, '<paragraph>>[]foo</paragraph>' );
+			model.change( writer => {
+				writer.insertText( ' ', doc.selection.getFirstPosition() );
+			} );
+
+			expect( getData( model ) ).to.equal( '<blockQuote><paragraph>[]foo</paragraph></blockQuote>' );
+		} );
+
+		it( 'should wrap the heading if greater-than character was used', () => {
 			setData( model, '<heading1>>[]</heading1>' );
 			model.change( writer => {
 				writer.insertText( ' ', doc.selection.getFirstPosition() );
 			} );
 
-			expect( getData( model ) ).to.equal( '<heading1>> []</heading1>' );
+			expect( getData( model ) ).to.equal( '<blockQuote><heading1>[]</heading1></blockQuote>' );
 		} );
 
 		it( 'should not replace greater-than character when inside numbered list', () => {
@@ -302,22 +356,31 @@ describe( 'Autoformat', () => {
 			expect( getData( model ) ).to.equal( '<codeBlock language="plaintext">[]</codeBlock>' );
 		} );
 
-		it( 'should not replace triple grave accents when already in a code block', () => {
-			setData( model, '<codeBlock language="plaintext">``[]</codeBlock>' );
+		it( 'should replace triple grave accents in a heading', () => {
+			setData( model, '<heading1>``[]</heading1>' );
 			model.change( writer => {
 				writer.insertText( '`', doc.selection.getFirstPosition() );
 			} );
 
-			expect( getData( model ) ).to.equal( '<codeBlock language="plaintext">```[]</codeBlock>' );
+			expect( getData( model ) ).to.equal( '<codeBlock language="plaintext">[]</codeBlock>' );
 		} );
 
-		it( 'should not replace triple grave accents when inside heading', () => {
-			setData( model, '<heading1>``[]</heading1>' );
+		it( 'should replace triple grave accents in a non-empty paragraph', () => {
+			setData( model, '<paragraph>``[]let foo = 1;</paragraph>' );
 			model.change( writer => {
 				writer.insertText( '`', doc.selection.getFirstPosition() );
 			} );
 
-			expect( getData( model ) ).to.equal( '<heading1>```[]</heading1>' );
+			expect( getData( model ) ).to.equal( '<codeBlock language="plaintext">[]let foo = 1;</codeBlock>' );
+		} );
+
+		it( 'should not replace triple grave accents when already in a code block', () => {
+			setData( model, '<codeBlock language="plaintext">``[]</codeBlock>' );
+			model.change( writer => {
+				writer.insertText( '`', doc.selection.getFirstPosition() );
+			} );
+
+			expect( getData( model ) ).to.equal( '<codeBlock language="plaintext">```[]</codeBlock>' );
 		} );
 
 		it( 'should not replace triple grave accents when inside numbered list', () => {

+ 30 - 4
packages/ckeditor5-autoformat/tests/blockautoformatediting.js

@@ -117,7 +117,7 @@ describe( 'blockAutoformatEditing', () => {
 
 		it( 'should ignore other delta operations', () => {
 			const spy = testUtils.sinon.spy();
-			blockAutoformatEditing( editor, plugin, /^[*]\s/, spy );
+			blockAutoformatEditing( editor, plugin, /^[*]\s$/, spy );
 
 			setData( model, '<paragraph>*[]</paragraph>' );
 			model.change( writer => {
@@ -127,9 +127,23 @@ describe( 'blockAutoformatEditing', () => {
 			sinon.assert.notCalled( spy );
 		} );
 
+		it( 'should ignore a ranged selection', () => {
+			model.schema.extend( '$text', { allowAttributes: 'foo' } );
+
+			const spy = testUtils.sinon.spy();
+			blockAutoformatEditing( editor, plugin, /^[*]\s$/, spy );
+
+			setData( model, '<paragraph>[* ]foo</paragraph>' );
+			model.change( writer => {
+				writer.setAttribute( 'foo', true, model.document.selection.getFirstRange() );
+			} );
+
+			sinon.assert.notCalled( spy );
+		} );
+
 		it( 'should stop if there is no text to run matching on', () => {
 			const spy = testUtils.sinon.spy();
-			blockAutoformatEditing( editor, plugin, /^[*]\s/, spy );
+			blockAutoformatEditing( editor, plugin, /^[*]\s$/, spy );
 
 			setData( model, '<paragraph>[]</paragraph>' );
 			model.change( writer => {
@@ -157,7 +171,7 @@ describe( 'blockAutoformatEditing', () => {
 				} );
 
 			const spy = testUtils.sinon.spy();
-			blockAutoformatEditing( editor, plugin, /^[*]\s/, spy );
+			blockAutoformatEditing( editor, plugin, /^[*]\s$/, spy );
 
 			setData( model, '<paragraph>*<softBreak></softBreak>[]</paragraph>' );
 			model.change( writer => {
@@ -167,6 +181,18 @@ describe( 'blockAutoformatEditing', () => {
 			sinon.assert.notCalled( spy );
 		} );
 
+		it( 'should not call callback when typing in the middle of block text', () => {
+			const spy = testUtils.sinon.spy();
+			blockAutoformatEditing( editor, plugin, /^[*]\s$/, spy );
+
+			setData( model, '<paragraph>* foo[]bar</paragraph>' );
+			model.change( writer => {
+				writer.insertText( ' ', doc.selection.getFirstPosition() );
+			} );
+
+			sinon.assert.notCalled( spy );
+		} );
+
 		it( 'should not call callback when after inline element (typing after softBreak in a "matching" paragraph)', () => {
 			// Configure the schema.
 			model.schema.register( 'softBreak', {
@@ -185,7 +211,7 @@ describe( 'blockAutoformatEditing', () => {
 				} );
 
 			const spy = testUtils.sinon.spy();
-			blockAutoformatEditing( editor, plugin, /^[*]\s/, spy );
+			blockAutoformatEditing( editor, plugin, /^[*]\s$/, spy );
 
 			setData( model, '<paragraph>* <softBreak></softBreak>[]</paragraph>' );
 

+ 5 - 7
packages/ckeditor5-autoformat/tests/manual/autoformat.md

@@ -1,14 +1,14 @@
 ## Autoformat
 
-1. Type `#` and press the space in an empty paragraph to replace it with a heading.
+Note: autoformat should not work in a code blocks.
 
-1. Type `*` or `-` and the press space in an empty paragraph to replace it with a list item.
+1. Type `#` and press the space at the beginning of a block to replace it with a heading.
 
-1. Type `>` and press the space in an empty paragraph to replace it with a block quote.
+1. Type `*` or `-` and the press space at the beginning of a block to replace it with a list item.
 
-1. Type a number from the range **1-3** followed by a `.` and press space to replace an empty paragraph with a numbered list item.
+1. Type `>` and press the space at the beginning of a block to replace it with a block quote.
 
-1. Type a number from the range **1-3** followed by a `)` and press space to replace an empty paragraph with a numbered list item.
+1. Type `1` followed by a `.` or `)` and press space (at the beginning of a block) to replace it with a numbered list item.
 
 1. Type `*foobar*`/`_foobar_` to italicize `foobar`. `*`/`_` should be removed.
 
@@ -22,6 +22,4 @@
 
 1. For every autoformat pattern: Undo until you'll see just the pattern (e.g. `- `). Typing should be then possible without triggering the autoformatting again.
 
-1. Typing a different pattern in an already converted block **must not** trigger the autoformatting. For example, typing `- ` in a heading should not convert a heading to a list.
-
 1. Type inline formatting (bold, italic, code, strikethrough) after a soft break (<kbd>Shift</kbd>+<kbd>Enter</kbd>).

+ 21 - 0
packages/ckeditor5-autosave/lang/translations/tk.po

@@ -0,0 +1,21 @@
+# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+#
+#                                     !!! IMPORTANT !!!
+#
+#         Before you edit this file, please keep in mind that contributing to the project
+#                translations is possible ONLY via the Transifex online service.
+#
+#         To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
+#
+#                   To learn more, check out the official contributor's guide:
+#     https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
+#
+msgid ""
+msgstr ""
+"Language-Team: Turkmen (https://www.transifex.com/ckeditor/teams/11143/tk/)\n"
+"Language: tk\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "A message that the data is being saved."
+msgid "Saving changes"
+msgstr "Üýtgeşmeleri saklaň"

+ 21 - 0
packages/ckeditor5-autosave/lang/translations/ug.po

@@ -0,0 +1,21 @@
+# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+#
+#                                     !!! IMPORTANT !!!
+#
+#         Before you edit this file, please keep in mind that contributing to the project
+#                translations is possible ONLY via the Transifex online service.
+#
+#         To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
+#
+#                   To learn more, check out the official contributor's guide:
+#     https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
+#
+msgid ""
+msgstr ""
+"Language-Team: Uyghur (https://www.transifex.com/ckeditor/teams/11143/ug/)\n"
+"Language: ug\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "A message that the data is being saved."
+msgid "Saving changes"
+msgstr "ئۆزگەرتىشلەرنى ساقلاش"

+ 5 - 5
packages/ckeditor5-autosave/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ckeditor/ckeditor5-autosave",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "Autosave feature for CKEditor 5.",
   "keywords": [
     "ckeditor",
@@ -10,13 +10,13 @@
     "ckeditor5-plugin"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^20.0.0",
-    "@ckeditor/ckeditor5-utils": "^20.0.0",
+    "@ckeditor/ckeditor5-core": "^21.0.0",
+    "@ckeditor/ckeditor5-utils": "^21.0.0",
     "lodash-es": "^4.17.15"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-editor-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^20.0.0"
+    "@ckeditor/ckeditor5-editor-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^21.0.0"
   },
   "engines": {
     "node": ">=12.0.0",

+ 1 - 1
packages/ckeditor5-autosave/src/autosave.js

@@ -139,7 +139,7 @@ export default class Autosave extends Plugin {
 		 * Editor's pending actions manager.
 		 *
 		 * @private
-		 * @member {@module:core/pendingactions~PendingActions} #_pendingActions
+		 * @member {module:core/pendingactions~PendingActions} #_pendingActions
 		 */
 	}
 

二进制
packages/ckeditor5-basic-styles/docs/assets/img/typing-after-code.gif


二进制
packages/ckeditor5-basic-styles/docs/assets/img/typing-inside-code.gif


+ 12 - 0
packages/ckeditor5-basic-styles/docs/features/basic-styles.md

@@ -47,6 +47,18 @@ By default, each feature can upcast more than one type of the content. Here's th
 | {@link module:basic-styles/subscript~Subscript} | `<sub>`, `<* style="vertical-align: sub">` |
 | {@link module:basic-styles/superscript~Superscript} | `<sup>`, `<* style="vertical-align: super">` |
 
+## Typing around inline code
+
+CKEditor 5 allows for typing both at inner and outer boundaries of code to make the editing easier for the users.
+
+**To type inside a code element**, move the caret to its (start or end) boundary. As long as the code remains highlighted (by default: less transparent gray), typing and applying formatting will be done within its boundaries:
+
+{@img assets/img/typing-inside-code.gif 770 The animation showing typing inside the code element in CKEditor 5 rich text editor.}
+
+**To type before or after a code element**, move the caret to its boundary, then press the Arrow key (<kbd>→</kbd> or <kbd>←</kbd>) once. The code is no longer highlighted and whatever text you type or formatting you apply will not be enclosed by the code element:
+
+{@img assets/img/typing-after-code.gif 770 The animation showing typing after the code element in CKEditor 5 rich text editor.}
+
 ## Installation
 
 To add the basic styles features to your editor install the [`@ckeditor/ckeditor5-basic-styles`](https://www.npmjs.com/package/@ckeditor/ckeditor5-basic-styles) package:

+ 45 - 0
packages/ckeditor5-basic-styles/lang/translations/tk.po

@@ -0,0 +1,45 @@
+# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+#
+#                                     !!! IMPORTANT !!!
+#
+#         Before you edit this file, please keep in mind that contributing to the project
+#                translations is possible ONLY via the Transifex online service.
+#
+#         To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
+#
+#                   To learn more, check out the official contributor's guide:
+#     https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
+#
+msgid ""
+msgstr ""
+"Language-Team: Turkmen (https://www.transifex.com/ckeditor/teams/11143/tk/)\n"
+"Language: tk\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "Toolbar button tooltip for the Bold feature."
+msgid "Bold"
+msgstr "Galyň"
+
+msgctxt "Toolbar button tooltip for the Italic feature."
+msgid "Italic"
+msgstr "Italik"
+
+msgctxt "Toolbar button tooltip for the Underline feature."
+msgid "Underline"
+msgstr "Aşagy çyzykly"
+
+msgctxt "Toolbar button tooltip for the Code feature."
+msgid "Code"
+msgstr "Kod"
+
+msgctxt "Toolbar button tooltip for the Strikethrough feature."
+msgid "Strikethrough"
+msgstr "Üsti çyzykly"
+
+msgctxt "Toolbar button tooltip for the Subscript feature."
+msgid "Subscript"
+msgstr "Aşaky ýazgy"
+
+msgctxt "Toolbar button tooltip for the Superscript feature."
+msgid "Superscript"
+msgstr "Üst ýazgy"

+ 4 - 4
packages/ckeditor5-basic-styles/lang/translations/ug.po

@@ -30,16 +30,16 @@ msgstr "ئاستى سىزىق"
 
 msgctxt "Toolbar button tooltip for the Code feature."
 msgid "Code"
-msgstr "كودى"
+msgstr "كود"
 
 msgctxt "Toolbar button tooltip for the Strikethrough feature."
 msgid "Strikethrough"
-msgstr ""
+msgstr "ئۆچۈرۈش سىزىقى"
 
 msgctxt "Toolbar button tooltip for the Subscript feature."
 msgid "Subscript"
-msgstr ""
+msgstr "ئاستبەلگە"
 
 msgctxt "Toolbar button tooltip for the Superscript feature."
 msgid "Superscript"
-msgstr ""
+msgstr "ئۈستبەلگە"

+ 10 - 9
packages/ckeditor5-basic-styles/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ckeditor/ckeditor5-basic-styles",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "Basic styles feature for CKEditor 5.",
   "keywords": [
     "ckeditor",
@@ -10,16 +10,17 @@
     "ckeditor5-plugin"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^20.0.0",
-    "@ckeditor/ckeditor5-ui": "^20.0.0"
+    "@ckeditor/ckeditor5-core": "^21.0.0",
+    "@ckeditor/ckeditor5-typing": "^21.0.0",
+    "@ckeditor/ckeditor5-ui": "^21.0.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-editor-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-engine": "^20.0.0",
-    "@ckeditor/ckeditor5-essentials": "^20.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^20.0.0",
-    "@ckeditor/ckeditor5-remove-format": "^20.0.0",
-    "@ckeditor/ckeditor5-utils": "^20.0.0"
+    "@ckeditor/ckeditor5-editor-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-engine": "^21.0.0",
+    "@ckeditor/ckeditor5-essentials": "^21.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^21.0.0",
+    "@ckeditor/ckeditor5-remove-format": "^21.0.0",
+    "@ckeditor/ckeditor5-utils": "^21.0.0"
   },
   "engines": {
     "node": ">=12.0.0",

+ 16 - 0
packages/ckeditor5-basic-styles/src/code/codeediting.js

@@ -9,8 +9,11 @@
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import AttributeCommand from '../attributecommand';
+import TwoStepCaretMovement from '@ckeditor/ckeditor5-typing/src/twostepcaretmovement';
+import setupHighlight from '@ckeditor/ckeditor5-typing/src/utils/inlinehighlight';
 
 const CODE = 'code';
+const HIGHLIGHT_CLASS = 'ck-code_selected';
 
 /**
  * The code editing feature.
@@ -31,6 +34,13 @@ export default class CodeEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
+	static get requires() {
+		return [ TwoStepCaretMovement ];
+	}
+
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 		const editor = this.editor;
 
@@ -53,5 +63,11 @@ export default class CodeEditing extends Plugin {
 
 		// Create code command.
 		editor.commands.add( CODE, new AttributeCommand( editor, CODE ) );
+
+		// Enable two-step caret movement for `code` attribute.
+		editor.plugins.get( TwoStepCaretMovement ).registerAttribute( CODE );
+
+		// Setup highlight over selected element.
+		setupHighlight( editor, CODE, 'code', HIGHLIGHT_CLASS );
 	}
 }

+ 35 - 0
packages/ckeditor5-basic-styles/tests/code/codeediting.js

@@ -11,6 +11,9 @@ import AttributeCommand from '../../src/attributecommand';
 
 import { getData as getModelData, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import { getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
+import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
+
+/* global document */
 
 describe( 'CodeEditing', () => {
 	let editor, model;
@@ -100,4 +103,36 @@ describe( 'CodeEditing', () => {
 			expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal( '<p><code>foo</code>bar</p>' );
 		} );
 	} );
+
+	it( 'should add `ck-code_selected` class when caret enters the element', () => {
+		// Put selection before the link element.
+		setModelData( editor.model, '<paragraph>foo[]<$text code="true">ba</$text>r</paragraph>' );
+
+		// So let's simulate the `keydown` event.
+		editor.editing.view.document.fire( 'keydown', {
+			keyCode: keyCodes.arrowright,
+			preventDefault: () => {},
+			domTarget: document.body
+		} );
+
+		expect( getViewData( editor.editing.view ) ).to.equal(
+			'<p>foo<code class="ck-code_selected">{}ba</code>r</p>'
+		);
+	} );
+
+	it( 'should remove `ck-code_selected` class when caret leaves the element', () => {
+		// Put selection before the link element.
+		setModelData( editor.model, '<paragraph>foo<$text code="true">ba[]</$text>r</paragraph>' );
+
+		// So let's simulate the `keydown` event.
+		editor.editing.view.document.fire( 'keydown', {
+			keyCode: keyCodes.arrowright,
+			preventDefault: () => {},
+			domTarget: document.body
+		} );
+
+		expect( getViewData( editor.editing.view ) ).to.equal(
+			'<p>foo<code>ba</code>{}r</p>'
+		);
+	} );
 } );

+ 4 - 0
packages/ckeditor5-basic-styles/theme/code.css

@@ -8,3 +8,7 @@
 	padding: .15em;
 	border-radius: 2px;
 }
+
+.ck.ck-editor__editable .ck-code_selected  {
+	background-color: hsla(0, 0%, 78%, 0.5);
+}

+ 21 - 0
packages/ckeditor5-block-quote/lang/translations/tk.po

@@ -0,0 +1,21 @@
+# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+#
+#                                     !!! IMPORTANT !!!
+#
+#         Before you edit this file, please keep in mind that contributing to the project
+#                translations is possible ONLY via the Transifex online service.
+#
+#         To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
+#
+#                   To learn more, check out the official contributor's guide:
+#     https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
+#
+msgid ""
+msgstr ""
+"Language-Team: Turkmen (https://www.transifex.com/ckeditor/teams/11143/tk/)\n"
+"Language: tk\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "Toolbar button tooltip for the Block quote feature."
+msgid "Block quote"
+msgstr "Sitata blokirläň"

+ 1 - 1
packages/ckeditor5-block-quote/lang/translations/ug.po

@@ -18,4 +18,4 @@ msgstr ""
 
 msgctxt "Toolbar button tooltip for the Block quote feature."
 msgid "Block quote"
-msgstr "قىسمەن قوللىنىش"
+msgstr "نەقىل"

+ 14 - 14
packages/ckeditor5-block-quote/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ckeditor/ckeditor5-block-quote",
-  "version": "20.0.0",
+  "version": "21.0.0",
   "description": "Block quote feature for CKEditor 5.",
   "keywords": [
     "ckeditor",
@@ -10,21 +10,21 @@
     "ckeditor5-plugin"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^20.0.0",
-    "@ckeditor/ckeditor5-ui": "^20.0.0",
-    "@ckeditor/ckeditor5-utils": "^20.0.0"
+    "@ckeditor/ckeditor5-core": "^21.0.0",
+    "@ckeditor/ckeditor5-ui": "^21.0.0",
+    "@ckeditor/ckeditor5-utils": "^21.0.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-basic-styles": "^20.0.0",
-    "@ckeditor/ckeditor5-editor-classic": "^20.0.0",
-    "@ckeditor/ckeditor5-engine": "^20.0.0",
-    "@ckeditor/ckeditor5-enter": "^20.0.0",
-    "@ckeditor/ckeditor5-heading": "^20.0.0",
-    "@ckeditor/ckeditor5-image": "^20.0.0",
-    "@ckeditor/ckeditor5-list": "^20.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^20.0.0",
-    "@ckeditor/ckeditor5-table": "^20.0.0",
-    "@ckeditor/ckeditor5-typing": "^20.0.0"
+    "@ckeditor/ckeditor5-basic-styles": "^21.0.0",
+    "@ckeditor/ckeditor5-editor-classic": "^21.0.0",
+    "@ckeditor/ckeditor5-engine": "^21.0.0",
+    "@ckeditor/ckeditor5-enter": "^21.0.0",
+    "@ckeditor/ckeditor5-heading": "^21.0.0",
+    "@ckeditor/ckeditor5-image": "^21.0.0",
+    "@ckeditor/ckeditor5-list": "^21.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^21.0.0",
+    "@ckeditor/ckeditor5-table": "^21.0.0",
+    "@ckeditor/ckeditor5-typing": "^21.0.0"
   },
   "engines": {
     "node": ">=12.0.0",

+ 7 - 4
packages/ckeditor5-block-quote/src/blockquoteediting.js

@@ -62,12 +62,12 @@ export default class BlockQuoteEditing extends Plugin {
 						continue;
 					}
 
-					if ( element.is( 'blockQuote' ) && element.isEmpty ) {
+					if ( element.is( 'element', 'blockQuote' ) && element.isEmpty ) {
 						// Added an empty blockQuote - remove it.
 						writer.remove( element );
 
 						return true;
-					} else if ( element.is( 'blockQuote' ) && !schema.checkChild( entry.position, element ) ) {
+					} else if ( element.is( 'element', 'blockQuote' ) && !schema.checkChild( entry.position, element ) ) {
 						// Added a blockQuote in incorrect place - most likely inside another blockQuote. Unwrap it
 						// so the content inside is not lost.
 						writer.unwrap( element );
@@ -78,7 +78,10 @@ export default class BlockQuoteEditing extends Plugin {
 						const range = writer.createRangeIn( element );
 
 						for ( const child of range.getItems() ) {
-							if ( child.is( 'blockQuote' ) && !schema.checkChild( writer.createPositionBefore( child ), child ) ) {
+							if (
+								child.is( 'element', 'blockQuote' ) &&
+								!schema.checkChild( writer.createPositionBefore( child ), child )
+							) {
 								writer.unwrap( child );
 
 								return true;
@@ -88,7 +91,7 @@ export default class BlockQuoteEditing extends Plugin {
 				} else if ( entry.type == 'remove' ) {
 					const parent = entry.position.parent;
 
-					if ( parent.is( 'blockQuote' ) && parent.isEmpty ) {
+					if ( parent.is( 'element', 'blockQuote' ) && parent.isEmpty ) {
 						// Something got removed and now blockQuote is empty. Remove the blockQuote as well.
 						writer.remove( parent );
 

文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/ckeditor.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/ckeditor.js.map


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/af.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ar.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ast.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/az.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/bg.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ca.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/cs.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/da.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/de-ch.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/de.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/el.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/en-au.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/en-gb.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/eo.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/es.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/et.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/eu.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/fa.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/fi.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/fr.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/gl.js


+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/gu.js

@@ -1 +1 @@
-(function(d){	const l = d['gu'] = d['gu'] || {};	l.dictionary=Object.assign(		l.dictionary||{},		{"Block quote":" વિચાર ટાંકો",Bold:"ઘાટુ - બોલ્ડ્","Cannot upload file:":"ફાઇલ અપલોડ ન થઇ શકી",Italic:"ત્રાંસુ - ઇટલિક્"}	);l.getPluralForm=function(n){return (n != 1);;};})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
+!function(n){const o=n.gu=n.gu||{};o.dictionary=Object.assign(o.dictionary||{},{"Block quote":" વિચાર ટાંકો",Bold:"ઘાટુ - બોલ્ડ્","Cannot upload file:":"ફાઇલ અપલોડ ન થઇ શકી",Italic:"ત્રાંસુ - ઇટલિક્"}),o.getPluralForm=function(n){return 1!=n}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/he.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/hr.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/hu.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/id.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/it.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ja.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/km.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/kn.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ko.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ku.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/lt.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/lv.js


+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ms.js

@@ -1 +1 @@
-(function(d){	const l = d['ms'] = d['ms'] || {};	l.dictionary=Object.assign(		l.dictionary||{},		{"Cannot upload file:":"Gagal memuat naik fail"}	);l.getPluralForm=function(n){return 0;;};})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
+!function(n){const i=n.ms=n.ms||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot upload file:":"Gagal memuat naik fail"}),i.getPluralForm=function(n){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/nb.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ne.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/nl.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/no.js


+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/oc.js

@@ -1 +1 @@
-(function(d){	const l = d['oc'] = d['oc'] || {};	l.dictionary=Object.assign(		l.dictionary||{},		{Bold:"Gras",Cancel:"Anullar",Italic:"Italica",Save:"Enregistrar"}	);l.getPluralForm=function(n){return (n > 1);;};})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
+!function(n){const a=n.oc=n.oc||{};a.dictionary=Object.assign(a.dictionary||{},{Bold:"Gras",Cancel:"Anullar",Italic:"Italica",Save:"Enregistrar"}),a.getPluralForm=function(n){return n>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/pl.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/pt-br.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/pt.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ro.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/ru.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/si.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/sk.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/sl.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/sq.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/sr-latn.js


文件差异内容过多而无法显示
+ 1 - 1
packages/ckeditor5-build-balloon-block/build/translations/sr.js


+ 0 - 0
packages/ckeditor5-build-balloon-block/build/translations/sv.js


部分文件因为文件数量过多而无法显示