Przeglądaj źródła

Merge stable into master

CKEditor Bot 5 lat temu
rodzic
commit
c545bd3026

+ 1 - 1
docs/index.md

@@ -11,7 +11,7 @@ meta-description: Learn how to install, integrate, configure and develop CKEdito
 <dl><dt>{@link builds/guides/overview CKEditor 5 Builds documentation}</dt><dd>Learn how to install, integrate and configure CKEditor 5 Builds. More complex aspects, like creating custom builds, are explained here, too.</dd>
 <dt>{@link framework/guides/overview CKEditor 5 Framework documentation}</dt><dd>Learn how to work with CKEditor 5 Framework, customize it, create your own plugins and custom editors, change the UI or even bring your own UI to the editor.</dd>
 <dt>{@link examples/index CKEditor 5 Examples}</dt><dd>Try out all CKEditor 5 Builds. See some of the possible customizations of CKEditor.</dd>
-<dt>{@link features/index CKEditor 5 Features}</dt><dd>Learn about selected features included in CKEditor 5 Builds.</dd>
+<dt>{@link features/index CKEditor 5 Features}</dt><dd>Learn about the features available for CKEditor 5 &mdash; both the ones included in Builds and a plethora of others.</dd>
 <dt>{@link api/index CKEditor 5 API Reference}</dt><dd>A complete API documentation.</dd></dl>
 
 ## Contribute

+ 9 - 0
packages/ckeditor5-alignment/docs/features/text-alignment.md

@@ -11,6 +11,15 @@ The {@link module:alignment/alignment~Alignment} feature enables support for tex
 
 {@snippet features/text-alignment}
 
+## Related features
+
+There are more CKEditor 5 features that can help you organize your content:
+* {@link features/title Document title} &ndash; Clearly divide your content into a title and body.
+* {@link features/headings Headings} &ndash; Split your content into logical sections.
+* {@link features/indent Block indentation} &ndash; Organize your content into visually separated blocks, indent crucial paragraphs, etc.
+* {@link features/block-quote Block quote} &ndash; Include block quotations or pull quotes in the rich-text content.
+* {@link features/remove-format Remove format} &ndash; Easily clean basic text formatting.
+
 ## Configuring alignment options
 
 It is possible to configure which alignment options are available in the editor by setting the {@link module:alignment/alignment~AlignmentConfig#options `alignment.options`} configuration option. You can choose from `'left'`, `'right'`, `'center'` and `'justify'`.

+ 10 - 1
packages/ckeditor5-basic-styles/docs/features/basic-styles.md

@@ -5,7 +5,7 @@ category: features
 
 {@snippet features/build-basic-styles-source}
 
-The {@link api/basic-styles basic styles} package provides text formatting features such as bold, italic, underline, strikethrough, subscript, superscript, and code.
+The {@link api/basic-styles basic styles} feature allows you to apply the most frequently used formatting indispensable for content creation. This package provides essential text styling features such as bold, italic, underline, strikethrough, subscript, superscript, and code. Coupled with more [formatting features](#related-features), these serve as a base for any WYSIWYG editor toolset.
 
 <info-box info>
 	All basic text styles can be removed with the {@link features/remove-format remove format} feature.
@@ -15,6 +15,15 @@ The {@link api/basic-styles basic styles} package provides text formatting featu
 
 {@snippet features/basic-styles}
 
+## Related features
+
+Check out also these CKEditor 5 features to gain better control over your content style and format:
+* {@link features/font Font styles} &ndash; Easily and efficiently control the font {@link features/font#configuring-the-font-family-feature family}, {@link features/font#configuring-the-font-size-feature size}, {@link features/font#configuring-the-font-color-and-font-background-color-features text or background color}.
+* {@link features/text-alignment Text alignment} &ndash; Because it does matter whether the content is left, right, centered or justified.
+* {@link features/code-blocks Code blocks}  &ndash; Insert longer, multiline code listings, expanding the inline code style greatly.
+* {@link features/highlight Highlight} &ndash; Mark important words and passages, aiding a review or drawing attention to specific parts of content.
+* {@link features/remove-format Remove format} &ndash; Easily clean basic text formatting.
+
 ## Available text styles
 
 | Style feature | {@link framework/guides/architecture/core-editor-architecture#commands Command} name | {@link builds/guides/integration/configuration#toolbar-setup Toolbar} component name | Output element |

+ 3 - 2
packages/ckeditor5-block-quote/docs/features/block-quote.md

@@ -17,8 +17,9 @@ Use the editor below to see the block quote plugin in action.
 
 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.
+* {@link features/indent Block indentation}  &ndash; Set indentation for text blocks such as paragraphs or lists.
+* {@link features/code-blocks Code block}  &ndash; Insert longer, multiline code listings.
+* {@link features/text-alignment Text alignment} &ndash; Align your content left, right, center it or justify.
 
 ## Installation
 

+ 7 - 0
packages/ckeditor5-code-block/docs/features/code-blocks.md

@@ -16,6 +16,13 @@ The {@link module:code-block/codeblock~CodeBlock} feature allows inserting and e
 
 {@snippet features/code-block}
 
+## Related features
+
+Here are some CKEditor 5 features that you may find helpfully similar:
+* {@link features/basic-styles Basic text styles} &ndash; Use the `code` formatting for short inline code chunks.
+* {@link features/block-quote Block quote} &ndash; Include block quotations or pull quotes in your rich-text content.
+* {@link features/indent Block indentation} &ndash; Set indentation for text blocks such as paragraphs or lists.
+
 ## Configuring code block languages
 
 Each code block can be assigned a programming language. The language of the code block is represented as a CSS class of the `<code>` element, both when editing and in the editor data:

+ 10 - 1
packages/ckeditor5-font/docs/features/font.md

@@ -5,7 +5,7 @@ category: features
 
 {@snippet features/build-font-source}
 
-The {@link module:font/font~Font} plugin enables the following features in the rich-text editor:
+The {@link module:font/font~Font} plugin provides extended text formatting options for the document content. It enables the following features in the rich-text editor:
 * {@link module:font/fontfamily~FontFamily} &ndash; Allows to change the font family by applying inline `<span>` elements with a `font-family` in the `style` attribute.
 * {@link module:font/fontsize~FontSize} &ndash; Allows to control the font size by applying inline `<span>` elements that either have a CSS class or a `font-size` in the `style` attribute.
 * {@link module:font/fontcolor~FontColor} &ndash; Allows to control the font color by applying inline `<span>` elements with a `color` in the `style` attribute.
@@ -19,6 +19,15 @@ The {@link module:font/font~Font} plugin enables the following features in the r
 
 {@snippet features/font}
 
+## Related features
+
+Here are some more CKEditor 5 features that can help you format your content:
+* {@link features/basic-styles Basic font styles} &ndash; The essentials, like **bold**, *italic* and others.
+* {@link features/text-alignment Text alignment} &ndash; Because it does matter whether the content is left, right, centered or justified.
+* {@link features/headings Headings} &ndash; Divide your content into sections.
+* {@link features/highlight Highlight} &ndash; Mark important words and passages, aiding a review or drawing attention to specific parts of content.
+* {@link features/remove-format Remove format} &ndash; Easily clean basic text formatting.
+
 ## Configuring the font family feature
 
 It is possible to configure which font family options are supported by the WYSIWYG editor. Use the {@link module:font/fontfamily~FontFamilyConfig#options `config.fontFamily.options`} configuration option to do so.

+ 12 - 0
packages/ckeditor5-heading/docs/_snippets/features/default-headings.html

@@ -0,0 +1,12 @@
+
+<div id="snippet-default-headings">
+	<h1>On the importance of headings</h1>
+	<h2>What is a heading?</h2>
+	<p>A heading should be viewed as a title or a subtitle displayed in the document or a webpage. These are created with the &lt;h1&gt; to &lt;h6&gt; HTML tags where  1 is the largest (and most important) while 6 is the lowest level heading.</p>
+	<h2>The reason to use headings</h2>
+	<p>Headings serve dual purpose in the documents: they help the creators and readers interact with the content and they also affect the way search engines index the webpage.</p>
+	<h3>Human interaction</h3>
+	<p>Having a clearly defined structure with sections and subsections is beneficial for both the creator, who can convey their message better as well as for the readers, who can access the content with ease. Having a few good headings aids scanning and searching for specific information in the document as well as structuring the data contained.</p>
+	<h3>Search engine indexing algorithms</h3>
+	<p>Search engines use the headings to index the structure of the document and point to important keywords.</p>
+</div>

+ 30 - 0
packages/ckeditor5-heading/docs/_snippets/features/default-headings.js

@@ -0,0 +1,30 @@
+/**
+ * @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 ClassicEditor, console, window, document */
+
+import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
+
+ClassicEditor
+	.create( document.querySelector( '#snippet-default-headings' ), {
+		cloudServices: CS_CONFIG,
+		heading: {
+			options: [
+				{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
+				{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
+				{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
+				{ model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' }
+			]
+		},
+		toolbar: {
+			viewportTopOffset: window.getViewportTopOffsetConfig()
+		}
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 16 - 1
packages/ckeditor5-heading/docs/features/headings.md

@@ -6,7 +6,7 @@ category: features
 
 {@snippet build-classic-source}
 
-The {@link module:heading/heading~Heading} feature enables support for headings.
+The {@link module:heading/heading~Heading} feature enables support for headings. These are used by the creators to structure their documents. They also aid both the readers, making the content more organized and easier to read, and the search indexers scanning for crucial information.
 
 <info-box info>
 	This feature is enabled by default in all builds.
@@ -26,6 +26,21 @@ By default, when your editor build does not include the title plugin, a `<h1>` e
 	You can read more about why the editor should not create `<h1>` elements for content headings in the [Headings section of Editor Recommendations](http://ckeditor.github.io/editor-recommendations/features/headings.html).
 </info-box>
 
+## Demo
+
+{@snippet features/default-headings}
+
+## Related features
+
+There are more CKEditor 5 features that can help you format your content:
+* {@link features/basic-styles Basic font styles} &ndash; The essentials, like **bold**, *italic* and others.
+* {@link features/title Document title} &ndash; Clearly divide your content into a title and body.
+* {@link features/indent Block indentation}  &ndash; Set indentation for text blocks such as paragraphs or lists.
+* {@link features/lists Lists}  &ndash; Organize your content better with ordered and unordered list you can style.
+* {@link features/remove-format Remove format} &ndash; Easily clean basic text formatting.
+
+## Configuration
+
 ### Configuring heading levels
 
 It is, of course, possible to configure which heading levels the editor should support and how they should be named in the Headings dropdown. Use the {@link module:heading/heading~HeadingConfig#options `heading.options`} configuration option to do so.

+ 7 - 0
packages/ckeditor5-heading/docs/features/title.md

@@ -15,6 +15,13 @@ Use the editor below to create a document with clearly separated title and body
 
 {@snippet features/title}
 
+## Related features
+
+There are more CKEditor 5 features that can help you structure your document better:
+* {@link features/headings Headings} &ndash; Divide your content into sections.
+* {@link features/indent Block indentation} &ndash; Organize your content into visually separated blocks, indent crucial paragraphs, etc.
+* {@link features/editor-placeholder Editor placeholder} &ndash; Set placeholder text to display when the content is empty. It helps users locate the editor in the application and prompts to input the content.
+
 ## Keyboard navigation
 
 The title plugin lets you move from the title to the body element using the <kbd>Tab</kbd> key, providing form-like experience. When the selection is at the beginning of the first body element, you can go back to the title element using <kbd>Shift</kbd>+<kbd>Tab</kbd>. You can also use <kbd>Enter</kbd> and <kbd>Backspace</kbd> keys to move the caret between the title and the body.

+ 8 - 0
packages/ckeditor5-highlight/docs/features/highlight.md

@@ -14,6 +14,14 @@ The highlight plugin always comes with a predefined and limited number of availa
 
 {@snippet features/highlight}
 
+## Related features
+
+There are more CKEditor 5 features that can help you style your content:
+* {@link features/basic-styles Basic font styles} &ndash; The essentials, like **bold**, *italic* and others.
+* {@link features/font Font styles} &ndash; Easily and efficiently control the font {@link features/font#configuring-the-font-family-feature family}, {@link features/font#configuring-the-font-size-feature size}, {@link features/font#configuring-the-font-color-and-font-background-color-features text or background color}.
+* {@link features/block-quote Block quote} &ndash; Include block quotations or pull quotes in your rich-text content.
+* {@link features/remove-format Remove format} &ndash; Easily clean basic text formatting.
+
 ## Configuring the highlight options
 
 ### Dropdown

+ 8 - 0
packages/ckeditor5-indent/docs/features/indent.md

@@ -15,6 +15,14 @@ The block indentation feature allows you to set indentation for text blocks such
 
 {@snippet features/indent}
 
+## Related features
+
+Here are some CKEditor 5 features that may aid structuring your content better:
+* {@link features/block-quote Block quote} &ndash; Include block quotations or pull quotes in your rich-text content.
+* {@link features/headings Headings} &ndash; Divide your content into sections.
+* {@link features/code-blocks Code block} &ndash; Insert longer, multiline code listings.
+* {@link features/text-alignment Text alignment} &ndash; Because it does matter whether the content is left, right, centered or justified.
+
 ## Configuring the block indentation feature
 
 This feature offers a few configuration options that can be used to adjust the text block indentation behavior.

+ 27 - 15
packages/ckeditor5-list/docs/_snippets/features/lists-style.html

@@ -1,18 +1,30 @@
 <div id="snippet-lists-styles">
-    <h2>Ingredients</h2>
-    <p>Ingredients required for making a coffee:</p>
-    <ul style="list-style-type:circle;">
-        <li>15g ground coffee</li>
-        <li>water</li>
-        <li>milk <i>(optional)</i></li>
-    </ul>
-    <h2>Instructions</h2>
-    <p>How to prepare a cup of coffee:</p>
-    <ol style="list-style-type:decimal-leading-zero;">
-        <li>Gather the ingredients.</li>
-        <li>Put 15g of ground coffee in the cup.</li>
-        <li>Boil 200ml of water.</li>
-        <li>Pour the water into the cup.</li>
-        <li>Optional: Add milk.</li>
+    <h2>Modern manned spacecraft</h2>
+    <ol style="list-style-type:upper-roman;">
+        <li>Soyuz (Soviet/Russian)</li>
+            <ol style="list-style-type:decimal;">
+                <li>Early stage (all retired)</li>
+                    <ol style="list-style-type:lower-latin;">
+                        <li>7K-OK</li>
+                        <li>7KT-OK</li>
+                        <li>7K-T</li>
+                        <li>7K-TM</li>
+                    </ol>
+                <li>Soyuz T (retired)</li>
+                <li>Soyuz TM (retired)</li>
+                <li>Soyuz TMA (retired)</li>
+                <li>Soyuz TMA-M (retired)</li>
+                <li>Soyuz MS</li>
+            </ol>
+        <li>STS orbiter (American; all retired)</li>
+            <ol style="list-style-type:decimal;">
+                <li>Columbia</li>
+                <li>Challenger</li>
+                <li>Discovery</li>
+                <li>Atlantis</li>
+                <li>Endeavour</li>
+            </ol>
+        <li>SpaceX Crew Dragon (American)</li>
+        <li>Shenzhou (Chinese)</li>
     </ol>
 </div>

+ 7 - 5
packages/ckeditor5-list/docs/features/lists.md

@@ -4,7 +4,7 @@ category: features
 
 # Lists
 
-The {@link module:list/list~List list} feature allows creating ordered (numbered) and unordered (bulleted) lists in the editor.
+The {@link module:list/list~List list} feature allows creating ordered (numbered) and unordered (bulleted) lists. This allows for better structuring and presenting specific content such as enumerating elements, creating tables of content or {@link features/todo-lists to-do lists}.
 
 <info-box info>
 	The feature is enabled by default in all CKEditor 5 WYSIWYG editor builds.
@@ -34,6 +34,12 @@ Use the editor below to see the list style plugin in action.
 
 {@snippet features/lists-style}
 
+## Related features
+
+These features also provide similar functionality:
+* {@link features/todo-lists To-do lists} &ndash; Create a list of interactive checkboxes with labels.
+* {@link features/indent Block indentation} &ndash; Set indentation for text blocks such as paragraphs or headings and lists.
+
 ### Installation
 
 To add this feature to your editor, install the [`@ckeditor/ckeditor5-list`](https://www.npmjs.com/package/@ckeditor/ckeditor5-list) package:
@@ -68,10 +74,6 @@ ClassicEditor
 
 Refer to the {@link features/indent Indenting lists} section of the Block indentation feature guide.
 
-## To-do list
-
-You can read more about the feature in the {@link features/todo-lists To-do lists} feature guide.
-
 ## Common API
 
 The {@link module:list/list~List} plugin registers:

+ 7 - 0
packages/ckeditor5-remove-format/docs/features/remove-format.md

@@ -16,6 +16,13 @@ Select the content you want to clean up and press the "Remove Format" button in
 
 {@snippet features/remove-format}
 
+## Related features
+
+There are more CKEditor 5 features that can help you format your content:
+* {@link features/basic-styles Basic font styles} &ndash; The essentials, like **bold**, *italic* and others.
+* {@link features/font Font styles} &ndash; Easily and efficiently control the font {@link features/font#configuring-the-font-family-feature family}, {@link features/font#configuring-the-font-size-feature size}, {@link features/font#configuring-the-font-color-and-font-background-color-features text or background color}.
+* {@link features/text-alignment Text alignment} &ndash; Align your content left, align it right, center it or justify.
+
 ## Configuring the remove format feature
 
 This feature has no integration–level configuration. Once enabled, it works out–of–the–box with all {@link features/index core editor features}.