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

Merge branch 'master' into i/7916

Piotrek Koszuliński 5 лет назад
Родитель
Сommit
9492ffef14
73 измененных файлов с 284 добавлено и 89 удалено
  1. 1 1
      docs/_snippets/examples/document-editor.html
  2. 27 0
      packages/ckeditor5-block-quote/docs/_snippets/features/block-quote.html
  3. 38 0
      packages/ckeditor5-block-quote/docs/_snippets/features/block-quote.js
  4. 6 2
      packages/ckeditor5-block-quote/docs/api/block-quote.md
  5. 69 0
      packages/ckeditor5-block-quote/docs/features/block-quote.md
  6. 0 0
      packages/ckeditor5-build-decoupled-document/build/ckeditor.js
  7. 0 0
      packages/ckeditor5-build-decoupled-document/build/ckeditor.js.map
  8. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ar.js
  9. 1 1
      packages/ckeditor5-build-decoupled-document/build/translations/ast.js
  10. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/az.js
  11. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/bg.js
  12. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/cs.js
  13. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/da.js
  14. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/de.js
  15. 0 1
      packages/ckeditor5-build-decoupled-document/build/translations/el.js
  16. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/en-au.js
  17. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/en-gb.js
  18. 0 1
      packages/ckeditor5-build-decoupled-document/build/translations/eo.js
  19. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/es.js
  20. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/et.js
  21. 0 1
      packages/ckeditor5-build-decoupled-document/build/translations/eu.js
  22. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/fa.js
  23. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/fi.js
  24. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/fr.js
  25. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/gl.js
  26. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/he.js
  27. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/hr.js
  28. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/hu.js
  29. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/id.js
  30. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/it.js
  31. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ja.js
  32. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/km.js
  33. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/kn.js
  34. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ko.js
  35. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ku.js
  36. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/lt.js
  37. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/lv.js
  38. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/nb.js
  39. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ne.js
  40. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/nl.js
  41. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/no.js
  42. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/pl.js
  43. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/pt-br.js
  44. 0 1
      packages/ckeditor5-build-decoupled-document/build/translations/pt.js
  45. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ro.js
  46. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ru.js
  47. 1 1
      packages/ckeditor5-build-decoupled-document/build/translations/si.js
  48. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/sk.js
  49. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/sq.js
  50. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/sr-latn.js
  51. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/sr.js
  52. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/sv.js
  53. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/tr.js
  54. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/ug.js
  55. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/uk.js
  56. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/vi.js
  57. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/zh-cn.js
  58. 0 0
      packages/ckeditor5-build-decoupled-document/build/translations/zh.js
  59. 2 0
      packages/ckeditor5-build-decoupled-document/src/ckeditor.js
  60. 12 0
      packages/ckeditor5-build-decoupled-document/tests/ckeditor.js
  61. 2 2
      packages/ckeditor5-build-decoupled-document/tests/manual/ckeditor.html
  62. 1 1
      packages/ckeditor5-media-embed/src/automediaembed.js
  63. 4 4
      packages/ckeditor5-media-embed/src/mediaembedcommand.js
  64. 11 0
      packages/ckeditor5-media-embed/tests/automediaembed.js
  65. 22 0
      packages/ckeditor5-media-embed/tests/insertmediacommand.js
  66. 8 8
      packages/ckeditor5-page-break/docs/features/page-break.md
  67. 14 14
      packages/ckeditor5-paste-from-office/tests/_data/image/adjacent-groups/model.edge.word2016.html
  68. 8 8
      packages/ckeditor5-paste-from-office/tests/_data/image/adjacent-groups/model.safari.word2016.html
  69. 14 14
      packages/ckeditor5-paste-from-office/tests/_data/image/adjacent-groups/model.word2016.html
  70. 0 25
      packages/ckeditor5-table/src/converters/upcasttable.js
  71. 1 3
      packages/ckeditor5-table/src/tableediting.js
  72. 1 1
      packages/ckeditor5-table/tests/converters/upcasttable.js
  73. 41 0
      packages/ckeditor5-table/tests/tableclipboard-paste.js

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

@@ -21,7 +21,7 @@
 							<td>9:30 AM - 11:30 AM</td>
 							<td>
 								<p><strong>Americano vs. Brewed</strong> - “know your coffee” with:&nbsp;</p>
-								<ul>
+								<ul style="list-style-type:circle;">
 									<li>Giulia Bianchi</li>
 									<li>Stefano Garau</li>
 									<li>Giuseppe Russo</li>

+ 27 - 0
packages/ckeditor5-block-quote/docs/_snippets/features/block-quote.html

@@ -0,0 +1,27 @@
+<div id="snippet-block-quote">
+	<h3>The Famous Einstein Quote that never was</h3>
+
+	<p>All of us &mdash; well, maybe most of us &mdash; have encountered the following quote in the past few years:</p>
+
+	<blockquote>
+		<p>Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.</p>
+
+		<p>Albert Einstein</p>
+	</blockquote>
+
+	<p>It is mostly popular on Facebook and other social networks, where people share it aplenty. No wonder, as it sounds great, it sounds smart, it is neat and, well, let&rsquo;s be frank &mdash; Albert is one hell of a figure!</p>
+
+	<p>The truth, however, is not as neat, not as great and people who mindlessly forward the quote are not as smart. Because, in fact, Einstein has never said that. It comes from a 2004 book &ldquo;The Rhythm of Life: Living Every Day with Passion and Purpose&rdquo; by Mathew Kelly, published almost 50 years after Albert&rsquo;s death in 1955.</p>
+
+	<p>He was, most probably, inspired by an essay by Amos E. Dolbear of Tufts titled &ldquo;An Educational Allegory&rdquo;, describing animals educated to work on their weakest features instead of their strongest ones. So an eagle was made to run, a penguin was forced to fly and so on. There is also the 1903 &ldquo;Jungle School Boards&rdquo; fable from an Illinois newspaper in which a monkey, a kangaroo and an elephant cannot agree on the curriculum for their animal school &mdash; should little animals be taught tree-climbing, jumping or looking wise?&nbsp;</p>
+
+	<p>In the late 1940s, something that appears to be an amalgam of the two was published and later reprinted with various changes in the 1960s. The idea evolved for decades and got mixed up with a few other quotes about being a genius originating back to the 1970s. Finally, Kelly wrote in his 2004 book:</p>
+
+	<blockquote>
+		<p>Albert Einstein wrote, &ldquo;Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.&rdquo; The question I have for you at this point of our journey together is, &ldquo;What is your genius?&rdquo;</p>
+	</blockquote>
+
+	<p>Why he attributed this to Albert Einstein remains unclear. The fact is, the quote got popular. But apparently not everybody is a genius when it comes to fact-checking and sources...</p>
+
+</div>
+

+ 38 - 0
packages/ckeditor5-block-quote/docs/_snippets/features/block-quote.js

@@ -0,0 +1,38 @@
+/**
+ * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
+ */
+
+/* globals window, document, console */
+
+import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
+
+ClassicEditor
+	.create( document.querySelector( '#snippet-block-quote' ), {
+		toolbar: {
+			items: [
+				'heading',
+				'|',
+				'bold',
+				'italic',
+				'link',
+				'|',
+				'bulletedList',
+				'numberedList',
+				'|',
+				'blockQuote',
+				'outdent',
+				'indent',
+				'|',
+				'undo',
+				'redo'
+			],
+			viewportTopOffset: window.getViewportTopOffsetConfig()
+		}
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err );
+	} );

+ 6 - 2
packages/ckeditor5-block-quote/docs/api/block-quote.md

@@ -8,13 +8,17 @@ category: api-reference
 
 This package implements block quote support for CKEditor 5.
 
+## Demo
+
+Check out the {@link features/block-quote#demo demo in the Block quote feature} guide.
+
 ## Documentation
 
-See the {@link module:block-quote/blockquote~BlockQuote} plugin documentation.
+See the {@link features/block-quote Block quote feature} guide and the {@link module:block-quote/blockquote~BlockQuote} plugin documentation.
 
 ## Installation
 
-```bash
+```
 npm install --save @ckeditor/ckeditor5-block-quote
 ```
 

+ 69 - 0
packages/ckeditor5-block-quote/docs/features/block-quote.md

@@ -0,0 +1,69 @@
+---
+category: features
+menu-title: Block quote
+---
+
+# Block quote
+
+The {@link module:block-quote/blockquote~BlockQuote} feature allows you to easily include block quotations or pull quotes in the rich-text content. This provides an attractive way to draw the readers' attention to selected parts of text. It also helps organize the content in a structured, elegant way and to manage the flow better.
+
+## Demo
+
+Use the editor below to see the block quote plugin in action.
+
+{@snippet features/block-quote}
+
+## Related features
+
+Here are some other CKEditor 5 features that you can use similarly to the block quote plugin to structure your text better:
+
+* The {@link features/indent block indentation feature} allows you to set indentation for text blocks such as paragraphs or lists.
+* The {@link features/code-blocks code block feature} allows for insertion of various code listings.
+
+## Installation
+
+To add this feature to your rich-text editor, install the [`@ckeditor/ckeditor5-block-quote`](https://www.npmjs.com/package/@ckeditor/ckeditor5-block-quote) package:
+
+```plaintext
+npm install --save @ckeditor/ckeditor5-block-quote
+```
+
+And add it to your plugin list configuration:
+
+```js
+import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ BlockQuote, ... ],
+		toolbar: [ 'blockQuote', ... ]
+	} )
+	.then( ... )
+	.catch( ... );
+```
+
+<info-box info>
+	Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
+</info-box>
+
+## Common API
+
+The {@link module:block-quote/blockquote~BlockQuote} plugin registers:
+
+* the `'blockQuote'` UI button component implemented by the {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature},
+* the `'blockQuote'` command implemented by the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}.
+
+The command can be executed using the {@link module:core/editor/editor~Editor#execute `editor.execute()`} method:
+
+```js
+// Applies block quote to the selected content.
+editor.execute( 'blockQuote' );
+```
+
+<info-box>
+	We recommend using the official {@link framework/guides/development-tools#ckeditor-5-inspector CKEditor 5 inspector} for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.
+</info-box>
+
+## Contribute
+
+The source code of the feature is available on GitHub in https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-block-quote.

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/ckeditor.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/ckeditor.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ar.js


+ 1 - 1
packages/ckeditor5-build-decoupled-document/build/translations/ast.js

@@ -1 +1 @@
-!function(e){const a=e.ast=e.ast||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Bold:"Negrina","Bulleted List":"Llista con viñetes",Cancel:"Encaboxar","Centered image":"","Change image text alternative":"","Dim grey":"",Downloadable:"","Dropdown toolbar":"","Edit link":"","Editor toolbar":"","Enter image caption":"","Full size image":"Imaxen a tamañu completu",Green:"",Grey:"","Image toolbar":"","image widget":"complementu d'imaxen","Insert image":"",Italic:"Cursiva","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"Enllazar","Link URL":"URL del enllaz",Next:"","Numbered List":"Llista numberada","Open in a new tab":"","Open link in new tab":"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"Refacer","Remove color":"","Rich Text Editor, %0":"Editor de testu arriquecíu, %0","Right aligned image":"",Save:"Guardar","Show more items":"","Side image":"Imaxen llateral",Strikethrough:"","Text alternative":"","This link has no URL":"",Turquoise:"",Underline:"",Undo:"Desfacer",Unlink:"Desenllazar","Upload failed":"",White:"",Yellow:""}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
+!function(e){const l=e.ast=e.ast||{};l.dictionary=Object.assign(l.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Bold:"Negrina","Bulleted List":"Llista con viñetes","Bulleted list styles toolbar":"",Cancel:"Encaboxar","Centered image":"","Change image text alternative":"",Circle:"",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Dropdown toolbar":"","Edit link":"","Editor toolbar":"","Enter image caption":"","Full size image":"Imaxen a tamañu completu",Green:"",Grey:"","Image toolbar":"","image widget":"complementu d'imaxen","Insert image":"",Italic:"Cursiva","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"Enllazar","Link URL":"URL del enllaz","Lower-latin":"","Lower–roman":"",Next:"","Numbered List":"Llista numberada","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Previous:"",Purple:"",Red:"",Redo:"Refacer","Remove color":"","Rich Text Editor, %0":"Editor de testu arriquecíu, %0","Right aligned image":"",Save:"Guardar","Show more items":"","Side image":"Imaxen llateral",Square:"",Strikethrough:"","Text alternative":"","This link has no URL":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"",Underline:"",Undo:"Desfacer",Unlink:"Desenllazar","Upload failed":"","Upper-latin":"","Upper-roman":"",White:"",Yellow:""}),l.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/az.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/bg.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/cs.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/da.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/de.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
packages/ckeditor5-build-decoupled-document/build/translations/el.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/en-au.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/en-gb.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
packages/ckeditor5-build-decoupled-document/build/translations/eo.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/es.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/et.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
packages/ckeditor5-build-decoupled-document/build/translations/eu.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/fa.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/fi.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/fr.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/gl.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/he.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/hr.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/hu.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/id.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/it.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ja.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/km.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/kn.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ko.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ku.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/lt.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/lv.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/nb.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ne.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/nl.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/no.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/pl.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/pt-br.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
packages/ckeditor5-build-decoupled-document/build/translations/pt.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ro.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ru.js


+ 1 - 1
packages/ckeditor5-build-decoupled-document/build/translations/si.js

@@ -1 +1 @@
-!function(e){const i=e.si=e.si||{};i.dictionary=Object.assign(i.dictionary||{},{Bold:"තදකුරු","Bulleted List":"බුලටිත ලැයිස්තුව","Cannot upload file:":"ගොනුව යාවත්කාලීන කළ නොහැක:","Centered image":"","Change image text alternative":"","Enter image caption":"","Full size image":"","Image toolbar":"","image widget":"","Insert image":"පින්තූරය ඇතුල් කරන්න",Italic:"ඇලකුරු","Left aligned image":"","Numbered List":"අංකිත ලැයිස්තුව",Redo:"නැවත කරන්න","Right aligned image":"","Side image":"",Strikethrough:"","Text alternative":"",Underline:"",Undo:"අහෝසි කරන්න","Upload failed":"උඩුගත කිරීම අසාර්ථක විය"}),i.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
+!function(e){const t=e.si=e.si||{};t.dictionary=Object.assign(t.dictionary||{},{Bold:"තදකුරු","Bulleted List":"බුලටිත ලැයිස්තුව","Bulleted list styles toolbar":"","Cannot upload file:":"ගොනුව යාවත්කාලීන කළ නොහැක:","Centered image":"","Change image text alternative":"",Circle:"",Decimal:"","Decimal with leading zero":"",Disc:"","Enter image caption":"","Full size image":"","Image toolbar":"","image widget":"","Insert image":"පින්තූරය ඇතුල් කරන්න",Italic:"ඇලකුරු","Left aligned image":"","Lower-latin":"","Lower–roman":"","Numbered List":"අංකිත ලැයිස්තුව","Numbered list styles toolbar":"",Redo:"නැවත කරන්න","Right aligned image":"","Side image":"",Square:"",Strikethrough:"","Text alternative":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Underline:"",Undo:"අහෝසි කරන්න","Upload failed":"උඩුගත කිරීම අසාර්ථක විය","Upper-latin":"","Upper-roman":""}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/sk.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/sq.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/sr-latn.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/sr.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/sv.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/tr.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/ug.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/uk.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/vi.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/zh-cn.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
packages/ckeditor5-build-decoupled-document/build/translations/zh.js


+ 2 - 0
packages/ckeditor5-build-decoupled-document/src/ckeditor.js

@@ -31,6 +31,7 @@ import Indent from '@ckeditor/ckeditor5-indent/src/indent';
 import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
 import Link from '@ckeditor/ckeditor5-link/src/link';
 import List from '@ckeditor/ckeditor5-list/src/list';
+import ListStyle from '@ckeditor/ckeditor5-list/src/liststyle';
 import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
@@ -67,6 +68,7 @@ DecoupledEditor.builtinPlugins = [
 	IndentBlock,
 	Link,
 	List,
+	ListStyle,
 	MediaEmbed,
 	Paragraph,
 	PasteFromOffice,

+ 12 - 0
packages/ckeditor5-build-decoupled-document/tests/ckeditor.js

@@ -180,6 +180,18 @@ describe( 'DecoupledEditor build', () => {
 				expect( editor.getData() ).to.equal( data );
 			} );
 
+			it( 'list style works', () => {
+				const data = [
+					'<ol style="list-style-type:upper-roman;">' +
+					'<li>Item 1.</li>' +
+					'<li>Item 2.</li>' +
+					'</ol>'
+				].join( '' );
+
+				editor.setData( data );
+				expect( editor.getData() ).to.equal( data );
+			} );
+
 			it( 'link works', () => {
 				const data = '<p><a href="//ckeditor.com">CKEditor.com</a></p>';
 

+ 2 - 2
packages/ckeditor5-build-decoupled-document/tests/manual/ckeditor.html

@@ -31,14 +31,14 @@
 		<p><a href="https://ckeditor.com">CKEditor&nbsp;5</a> is <i>under heavy development</i> and this demo
 		is not production-ready software. For example:</p>
 
-		<ul>
+		<ol style="list-style-type:upper-roman;">
 			<li><strong>Only Chrome, Opera and Safari are supported</strong>.</li>
 			<li>Firefox requires enabling the
 			<a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/onselectionchange">
 			&ldquo;dom.select_events.enabled&rdquo;</a> option.</li>
 			<li><a href="https://github.com/ckeditor/ckeditor5/issues/342">Support for pasting</a>
 			is under development (content filtering is unstable).</li>
-		</ul>
+		</ol>
 
 		<p>It has <em>bugs</em> that we are aware of &mdash; and that we will be working on in the next few
 		iterations of the project. Stay tuned for some updates soon!</p>

+ 1 - 1
packages/ckeditor5-media-embed/src/automediaembed.js

@@ -16,7 +16,7 @@ import Undo from '@ckeditor/ckeditor5-undo/src/undo';
 import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 import { insertMedia } from './utils';
 
-const URL_REGEXP = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/;
+const URL_REGEXP = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=%]+$/;
 
 /**
  * The auto-media embed plugin. It recognizes media links in the pasted content and embeds

+ 4 - 4
packages/ckeditor5-media-embed/src/mediaembedcommand.js

@@ -30,12 +30,13 @@ export default class MediaEmbedCommand extends Command {
 		const model = this.editor.model;
 		const selection = model.document.selection;
 		const schema = model.schema;
-		const position = selection.getFirstPosition();
+		const insertPosition = findOptimalInsertionPosition( selection, model );
 		const selectedMedia = getSelectedMediaModelWidget( selection );
 
-		let parent = position.parent;
+		let parent = insertPosition.parent;
 
-		if ( parent != parent.root ) {
+		// The model.insertContent() will remove empty parent (unless it is a $root or a limit).
+		if ( parent.isEmpty && !model.schema.isLimit( parent ) ) {
 			parent = parent.parent;
 		}
 
@@ -68,4 +69,3 @@ export default class MediaEmbedCommand extends Command {
 		}
 	}
 }
-

+ 11 - 0
packages/ckeditor5-media-embed/tests/automediaembed.js

@@ -398,6 +398,17 @@ describe( 'AutoMediaEmbed - integration', () => {
 					return newEditor.destroy();
 				} );
 		} );
+
+		it( 'works for URL with %-symbols', () => {
+			setData( editor.model, '<paragraph>[]</paragraph>' );
+			pasteHtml( editor, 'http://youtube.com/watch?v=H08tGjXNHO4%2' );
+
+			clock.tick( 100 );
+
+			expect( getData( editor.model ) ).to.equal(
+				'[<media url="http://youtube.com/watch?v=H08tGjXNHO4%2"></media>]'
+			);
+		} );
 	} );
 
 	describe( 'use real timers', () => {

+ 22 - 0
packages/ckeditor5-media-embed/tests/insertmediacommand.js

@@ -50,6 +50,28 @@ describe( 'MediaEmbedCommand', () => {
 			expect( command.isEnabled ).to.be.true;
 		} );
 
+		it( 'should be true if a media is selected in a table cell', () => {
+			model.schema.register( 'table', { allowIn: '$root', isLimit: true, isObject: true, isBlock: true } );
+			model.schema.register( 'tableRow', { allowIn: 'table', isLimit: true } );
+			model.schema.register( 'tableCell', { allowIn: 'tableRow', isLimit: true, isSelectable: true } );
+			model.schema.extend( 'media', { allowIn: 'tableCell' } );
+
+			setData( model, '<table><tableRow><tableCell>[<media></media>]</tableCell></tableRow></table>' );
+
+			expect( command.isEnabled ).to.be.true;
+		} );
+
+		it( 'should be true if in a table cell', () => {
+			model.schema.register( 'table', { allowIn: '$root', isLimit: true, isObject: true, isBlock: true } );
+			model.schema.register( 'tableRow', { allowIn: 'table', isLimit: true } );
+			model.schema.register( 'tableCell', { allowIn: 'tableRow', isLimit: true, isSelectable: true } );
+			model.schema.extend( '$block', { allowIn: 'tableCell' } );
+
+			setData( model, '<table><tableRow><tableCell><p>foo[]</p></tableCell></tableRow></table>' );
+
+			expect( command.isEnabled ).to.be.true;
+		} );
+
 		it( 'should be true when the selection directly in a block', () => {
 			model.schema.register( 'block', { inheritAllFrom: '$block' } );
 			model.schema.extend( '$text', { allowIn: 'block' } );

+ 8 - 8
packages/ckeditor5-page-break/docs/features/page-break.md

@@ -15,6 +15,14 @@ Use the editor to see the {@link module:page-break/pagebreak~PageBreak} plugin i
 
 {@snippet features/page-break}
 
+## Related features
+
+Here are some useful CKEditor 5 features that you can use together with the page break plugin for an all-around paged editing experience:
+
+* The [pagination feature](https://ckeditor.com/docs/ckeditor5/latest/features/pagination.html) allows you to see where page breaks would be after the document is [exported to PDF](https://ckeditor.com/docs/ckeditor5/latest/features/export-pdf.html) or [to Word](https://ckeditor.com/docs/ckeditor5/latest/features/export-word.html).
+* The [export to Word](https://ckeditor.com/docs/ckeditor5/latest/features/export-word.html) feature will allow you to generate editable, paged `.docx` files out of your editor-created content.
+* The [export to PDF](https://ckeditor.com/docs/ckeditor5/latest/features/export-pdf.html) feature will allow you to generate portable, paged PDF files out of your editor-created content.
+
 ## Installation
 
 To add this feature to your rich-text editor, install the [`@ckeditor/ckeditor5-page-break`](https://www.npmjs.com/package/@ckeditor/ckeditor5-page-break) package:
@@ -41,14 +49,6 @@ ClassicEditor
 	Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
 </info-box>
 
-## Related features
-
-Here are some useful CKEditor 5 features that you can use together with the page break plugin for an all-around paged editing experience:
-
-* The [pagination feature](https://ckeditor.com/docs/ckeditor5/latest/features/pagination.html) allows you to see where page breaks would be after the document is [exported to PDF](https://ckeditor.com/docs/ckeditor5/latest/features/export-pdf.html) or [to Word](https://ckeditor.com/docs/ckeditor5/latest/features/export-word.html).
-* The [export to Word](https://ckeditor.com/docs/ckeditor5/latest/features/export-word.html) feature will allow you to generate editable, paged `.docx` files out of your editor-created content.
-* The [export to PDF](https://ckeditor.com/docs/ckeditor5/latest/features/export-pdf.html) feature will allow you to generate portable, paged PDF files out of your editor-created content.
-
 ## Common API
 
 The {@link module:page-break/pagebreak~PageBreak} plugin registers:

+ 14 - 14
packages/ckeditor5-paste-from-office/tests/_data/image/adjacent-groups/model.edge.word2016.html

@@ -2,30 +2,30 @@
 
 <table>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell colspan="4"><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell colspan="4"></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell colspan="2"><paragraph></paragraph></tableCell>
-		<tableCell rowspan="2"><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell colspan="2"></tableCell>
+		<tableCell rowspan="2"></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell rowspan="2"><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell rowspan="2"></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 </table>
 

+ 8 - 8
packages/ckeditor5-paste-from-office/tests/_data/image/adjacent-groups/model.safari.word2016.html

@@ -1,20 +1,20 @@
 <paragraph></paragraph>
 <table>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell colspan="2"><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell colspan="2"></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 </table>
 

+ 14 - 14
packages/ckeditor5-paste-from-office/tests/_data/image/adjacent-groups/model.word2016.html

@@ -1,29 +1,29 @@
 <table>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell colspan="4"><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell colspan="4"></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell colspan="2"><paragraph></paragraph></tableCell>
-		<tableCell rowspan="2"><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell colspan="2"></tableCell>
+		<tableCell rowspan="2"></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
-		<tableCell rowspan="2"><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
+		<tableCell rowspan="2"></tableCell>
 	</tableRow>
 	<tableRow>
-		<tableCell><paragraph></paragraph></tableCell>
+		<tableCell></tableCell>
 	</tableRow>
 </table>
 

+ 0 - 25
packages/ckeditor5-table/src/converters/upcasttable.js

@@ -84,31 +84,6 @@ export function skipEmptyTableRow() {
 	};
 }
 
-/**
- * A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.
- *
- * @returns {Function} Conversion helper.
- */
-export function ensureParagraphInTableCell( elementName ) {
-	return dispatcher => {
-		dispatcher.on( `element:${ elementName }`, ( evt, data, conversionApi ) => {
-			// The default converter will create a model range on converted table cell.
-			if ( !data.modelRange ) {
-				return;
-			}
-
-			const tableCell = data.modelRange.start.nodeAfter;
-
-			// Ensure a paragraph in the model for empty table cells for converted table cells.
-			if ( !tableCell.childCount ) {
-				const modelCursor = conversionApi.writer.createPositionAt( tableCell, 0 );
-
-				conversionApi.writer.insertElement( 'paragraph', modelCursor );
-			}
-		}, { priority: 'low' } );
-	};
-}
-
 // Scans table rows and extracts required metadata from the table:
 //
 // headingRows    - The number of rows that go as table headers.

+ 1 - 3
packages/ckeditor5-table/src/tableediting.js

@@ -9,7 +9,7 @@
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
-import upcastTable, { ensureParagraphInTableCell, skipEmptyTableRow } from './converters/upcasttable';
+import upcastTable, { skipEmptyTableRow } from './converters/upcasttable';
 import {
 	downcastInsertCell,
 	downcastInsertRow,
@@ -106,8 +106,6 @@ export default class TableEditing extends Plugin {
 		// Table cell conversion.
 		conversion.for( 'upcast' ).elementToElement( { model: 'tableCell', view: 'td' } );
 		conversion.for( 'upcast' ).elementToElement( { model: 'tableCell', view: 'th' } );
-		conversion.for( 'upcast' ).add( ensureParagraphInTableCell( 'td' ) );
-		conversion.for( 'upcast' ).add( ensureParagraphInTableCell( 'th' ) );
 
 		conversion.for( 'editingDowncast' ).add( downcastInsertCell() );
 

+ 1 - 1
packages/ckeditor5-table/tests/converters/upcasttable.js

@@ -285,7 +285,7 @@ describe( 'upcastTable()', () => {
 		);
 
 		expectModel(
-			'<fooTable><fooRow><fooCell><paragraph></paragraph></fooCell></fooRow></fooTable>'
+			'<fooTable><fooRow><fooCell></fooCell></fooRow></fooTable>'
 		);
 	} );
 

+ 41 - 0
packages/ckeditor5-table/tests/tableclipboard-paste.js

@@ -3917,6 +3917,36 @@ describe( 'table clipboard', () => {
 				[ '02', '21', '22' ]
 			] ) );
 		} );
+
+		it( 'should not blow up when pasting unsupported element in table', async () => {
+			await createEditor( [ TableCellPropertiesEditing ] );
+
+			pasteHtml( editor,
+				'<table>' +
+					'<tbody>' +
+						'<tr>' +
+							'<td>' +
+								'<div>' +
+									'<table>' +
+										'<tbody>' +
+											'<tr>' +
+												'<td style="border: 2px solid rgb(242, 242, 242);">' +
+													'<p>Test</p>' +
+												'</td>' +
+											'</tr>' +
+										'</tbody>' +
+									'</table>' +
+								'</div>' +
+							'</td>' +
+						'</tr>' +
+					'</tbody>' +
+				'</table>'
+			);
+
+			assertEqualMarkup( getModelData( model, { withoutSelection: true } ), modelTable( [
+				[ '<paragraph>Test</paragraph><paragraph></paragraph>' ]
+			] ) );
+		} );
 	} );
 
 	async function createEditor( extraPlugins = [] ) {
@@ -3930,6 +3960,17 @@ describe( 'table clipboard', () => {
 		tableSelection = editor.plugins.get( 'TableSelection' );
 	}
 
+	function pasteHtml( editor, html ) {
+		const data = {
+			dataTransfer: createDataTransfer(),
+			stopPropagation() {},
+			preventDefault() {}
+		};
+
+		data.dataTransfer.setData( 'text/html', html );
+		editor.editing.view.document.fire( 'paste', data );
+	}
+
 	function pasteTable( tableData, attributes = {} ) {
 		const data = {
 			dataTransfer: createDataTransfer(),

Некоторые файлы не были показаны из-за большого количества измененных файлов