Kaynağa Gözat

Merge branch 'master' into i/5605

Aleksander Nowodzinski 6 yıl önce
ebeveyn
işleme
e78dbcbd5b

+ 2 - 2
.github/ISSUE_TEMPLATE/5-task.md

@@ -1,13 +1,13 @@
 ---
 name: "\U0001F477 Task"
-about: It's neither a bug nor feature request.
+about: It's neither a bug nor a feature request.
 title: ''
 labels: type:task
 assignees: ''
 
 ---
 
-## Provide description of the task
+## Provide a description of the task
 
 *What steps should be taken to fulfil the task?*
 

+ 36 - 0
docs/_snippets/examples/document-editor.html

@@ -200,4 +200,40 @@
 	.document-editor .ck-content table td {
 		vertical-align: middle;
 	}
+
+	@media only screen and (max-width: 960px) {
+		/* Because on mobile 2cm paddings are to big. */
+		.document-editor__editable-container .document-editor__editable.ck-editor__editable {
+			padding: 1.5em;
+		}
+	}
+
+	@media only screen and (max-width: 1200px) {
+		.main__content-wide .document-editor__editable-container .document-editor__editable.ck-editor__editable {
+			width: 100%;
+		}
+	}
+
+	/* Style document editor a'ka Google Docs.*/
+	@media only screen and (min-width: 1360px) {
+		.main .main__content.main__content-wide {
+			padding-right: 0;
+		}
+	}
+
+	@media only screen and (min-width: 1600px) {
+		.main .main__content.main__content-wide {
+			width: 24cm;
+		}
+
+		.main .main__content.main__content-wide .main__content-inner {
+			width: auto;
+			margin: 0 50px;
+		}
+
+		/* Keep "page" look based on viewport width. */
+		.main__content-wide .document-editor__editable-container .document-editor__editable.ck-editor__editable {
+			width: 60%;
+		}
+	}
 </style>

+ 5 - 2
docs/_snippets/examples/multi-root-editor.js

@@ -366,13 +366,16 @@ class MultirootEditorUIView extends EditorUIView {
 		}
 
 		// This toolbar may be placed anywhere in the page so things like font size need to be reset in it.
-		// Also because of the above, make sure the toolbar supports rounded corners.
+		// Because of the above, make sure the toolbar supports rounded corners.
+		// Also, make sure the toolbar has the proper dir attribute because its ancestor may not have one
+		// and some toolbar item styles depend on this attribute.
 		Template.extend( this.toolbar.template, {
 			attributes: {
 				class: [
 					'ck-reset_all',
 					'ck-rounded-corners'
-				]
+				],
+				dir: locale.uiLanguageDirection
 			}
 		} );
 	}

+ 15 - 24
docs/assets/styles.css

@@ -2,12 +2,12 @@
  * Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  */
 
-/* https://github.com/ckeditor/ckeditor5/issues/913 */
-@media only screen and (min-width: 1600px) {
-	/* https://github.com/ckeditor/ckeditor5/issues/1077 */
-	.main .main__content .main__content-inner,
-	.main .main__content-wide .main__content-inner {
-		width: 840px;
+/* https://github.com/ckeditor/ckeditor5/issues/5598. */
+@media only screen and (min-width: 960px) and (max-width: 1024px ) {
+	.main .main__content {
+		/* Reduce content width including side navigation (340px). */
+		max-width: calc( 100% - 340px );
+		min-width: auto;
 	}
 }
 
@@ -17,31 +17,22 @@ https://github.com/ckeditor/ckeditor5-build-decoupled-document/issues/12 */
 	/* https://github.com/ckeditor/ckeditor5/issues/1077 */
 	.main .main__content .main__content-inner,
 	.main .main__content-wide .main__content-inner {
-		max-width: 900px;
 		padding-left: 30px;
 		padding-right: 30px
 	}
 }
 
-/* https://github.com/ckeditor/ckeditor5/issues/913 */
-@media only screen and (min-width: 1360px) {
-	.main .main__content.main__content-wide {
-		padding-right: 0;
-	}
-
-	.main .main__content-wide .main__content-inner {
-		max-width: 840px;
+/* https://github.com/ckeditor/ckeditor5/issues/5598. */
+@media only screen and (max-width: 1360px) {
+	.main .main__content-inner {
+		max-width: 960px;
 	}
 }
-
-/* https://github.com/ckeditor/ckeditor5/issues/1007 */
-@media only screen and (min-width: 1600px) {
-	.main .main__content.main__content-wide {
-		/*
-		 * `.main__content` by default has 760px width and 340px right padding.
-		 * `.main__content-wide` is 40px wider (800px), that's why we are reducing this right padding.
-		 */
-		padding-right: 300px;
+/* https://github.com/ckeditor/ckeditor5/issues/5598. */
+@media only screen and (min-width: 1360px) {
+	.main .main__content--no-toc .main__content-inner {
+		/* Because there is `width: auto`, we need to set some minimal value. */
+		min-width: 910px;
 	}
 }
 

+ 1 - 0
docs/examples/builds/balloon-block-editor.md

@@ -1,6 +1,7 @@
 ---
 category: examples-builds
 order: 30
+classes: main__content--no-toc
 ---
 
 # Balloon block editor

+ 1 - 0
docs/examples/builds/balloon-editor.md

@@ -1,6 +1,7 @@
 ---
 category: examples-builds
 order: 30
+classes: main__content--no-toc
 ---
 
 # Balloon editor

+ 1 - 0
docs/examples/builds/classic-editor.md

@@ -1,6 +1,7 @@
 ---
 category: examples-builds
 order: 10
+classes: main__content--no-toc
 ---
 
 # Classic editor

+ 1 - 0
docs/examples/builds/custom-build.md

@@ -1,6 +1,7 @@
 ---
 category: examples-builds
 order: 40
+classes: main__content--no-toc
 ---
 
 # Custom build

+ 1 - 1
docs/examples/builds/document-editor.md

@@ -1,7 +1,7 @@
 ---
 category: examples-builds
 order: 30
-classes: main__content-wide
+classes: 'main__content-wide main__content--no-toc'
 ---
 
 # Document editor

+ 1 - 0
docs/examples/builds/inline-editor.md

@@ -1,6 +1,7 @@
 ---
 category: examples-builds
 order: 20
+classes: main__content--no-toc
 ---
 
 # Inline editor

+ 13 - 5
docs/features/index.md

@@ -11,19 +11,27 @@ feedback-widget: false
 	Use the <span class="navigation-hint_desktop">**navigation tree on the left**</span><span class="navigation-hint_mobile">**main menu button in the upper-left corner**</span> to navigate through selected CKEditor 5 features.
 </info-box>
 
-## Features availability
+## Feature availability
 
-Most of the features are included in CKEditor 5 Builds and are available out of the box, like for example {@link features/autoformat Autoformatting} or {@link features/keyboard-support Keyboard support}. However, some of the presented features need to be manually included in a customized CKEditor build, for example the {@link features/markdown Markdown processor} which outputs Markdown instead of HTML.
+The number of features available for CKEditor 5 is constantly growing. Plenty of them are included by default in CKEditor 5 Builds and are available out-of-the-box, like for example {@link features/autoformat autoformatting} or {@link features/keyboard-support keyboard support}. However, some of the presented features need to be manually included in a customized CKEditor 5 build, for example the {@link features/markdown Markdown processor} which outputs Markdown instead of HTML.
+
+## Feature examples
+
+Each rich-text editor feature is presented on a separate page, with one or more working demos showcasing a feature along with some customization ideas that you can use in your implementation.
+
+<info-box>
+	**In most demos the number of features enabled is limited** to make the currently highlighted piece of functionality stand out more. However, in your CKEditor 5 WYSIWYG editor implementation you are free to choose and combine any features you like from those available.
+</info-box> 
 
 ## Looking for more?
 
-The examples on the left do not present all features included in CKEditor 5. For example some end-user features like bulleted and numbered lists are quite self-explanatory.
+The examples on the left do not present all features included in CKEditor 5. For example, some end-user features like bulleted and numbered lists or undo and redo are quite self-explanatory.
 
-Please bear in mind that the stable version of CKEditor 5 has not been officially released yet and with time more features will be added to CKEditor 5. If you are missing anything particular, feel free to [suggest a new feature](https://github.com/ckeditor/ckeditor5/issues) and share your feedback with us. If it has already been reported by someone else, upvote it to show your support.
+CKEditor 5 is in active development now and new features are added all the time, while the existing ones are being expanded and improved. If you are missing anything in particular, feel free to [suggest a new feature](https://github.com/ckeditor/ckeditor5/issues/new?labels=type%3Afeature&template=2-feature-request.md) and share your feedback with us. If it has already been reported by someone else, upvote it 👍 to show your support.
 
 ## How about creating your own features?
 
 Probably the most exciting features are the ones you can develop on top of CKEditor 5 Framework!
-We are slowly enhancing the {@link framework/index CKEditor 5 Framework documentation} together with {@link api/index API documentation}, hoping to give you a solid base for {@link framework/guides/creating-simple-plugin creating custom features}.
+We are gradually enhancing the {@link framework/index CKEditor 5 Framework documentation} together with {@link api/index API documentation}, hoping to give you a solid base for {@link framework/guides/creating-simple-plugin creating custom features}.
 
 The official add-ons repository for CKEditor 4 reached an impressive number of over 300 add-ons created and published by the community. Now it is time for you to add your contributions to the brand new CKEditor 5!

+ 5 - 2
docs/framework/guides/custom-editor-creator.md

@@ -369,13 +369,16 @@ class MultirootEditorUIView extends EditorUIView {
 		}
 
 		// This toolbar may be placed anywhere in the page so things like font size need to be reset in it.
-		// Also because of the above, make sure the toolbar supports rounded corners.
+		// Because of the above, make sure the toolbar supports rounded corners.
+		// Also, make sure the toolbar has the proper dir attribute because its ancestor may not have one
+		// and some toolbar item styles depend on this attribute.
 		Template.extend( this.toolbar.template, {
 			attributes: {
 				class: [
 					'ck-reset_all',
 					'ck-rounded-corners'
-				]
+				],
+				dir: locale.uiLanguageDirection
 			}
 		} );
 	}