8
0
فهرست منبع

Updated the guide and snippet.

Anna Tomanek 5 سال پیش
والد
کامیت
7fc4ed2d13

+ 4 - 4
packages/ckeditor5-heading/docs/_snippets/features/heading-buttons.html

@@ -1,9 +1,9 @@
 <div id="snippet-heading-buttons">
-	<h1>The overall user experience</h1>
+	<h1>Choosing the best user experience</h1>
 	<h3>Usability</h3>
-	<p>There are certain situations, both user-oriented or independent, in which different solutions work better. Splitting the heading dropdown into separate buttons does certainly speed up the access, while at the same time taking up more space. It is up to the user to decide, whether easier accessability prevails over tidy toolbar.</p>
+	<p>There are certain situations, both user-oriented or context-dependent, in which different solutions work better. Splitting the heading dropdown into separate buttons does certainly speed up the access, while at the same time taking up more space. It is up to the user to decide whether easier accessability prevails over a tidy toolbar.</p>
 	<h3>Personal preference</h3>
-	<p>Usability and editing needs might be one of the factors, but still there is the personal preference - the user's previous experience and habits might come forth and be a decisive factor.</p>
+	<p>Usability and editing needs might be one of the factors but still there is the personal preference &mdash; the user's previous experience and habits might come forth and be a decisive factor.</p>
 	<h3>Flexibility</h3>
-	<p>Whatever the reason may be to use both the standard heading dropdown list or the separate heading toolbar buttons, <a href="https://ckeditor.com">CKEditor 5</a> WYSIWYG editor offers both of these options for greater comfort of rich-text edition and user satisfaction.</p>
+	<p>Whatever the reason may be to use both the standard heading dropdown list or the separate heading toolbar buttons, <a href="https://ckeditor.com/">CKEditor 5</a> WYSIWYG editor offers both of these options for greater comfort of rich-text creation and user satisfaction.</p>
 </div>

+ 1 - 4
packages/ckeditor5-heading/docs/_snippets/features/heading-buttons.js

@@ -11,10 +11,7 @@ ClassicEditor
 				{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
 				{ model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
 				{ model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
-				{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' },
-				{ model: 'heading4', view: 'h5', title: 'Heading 4', class: 'ck-heading_heading4' },
-				{ model: 'heading5', view: 'h6', title: 'Heading 5', class: 'ck-heading_heading5' },
-				{ model: 'heading6', view: 'p', title: 'Heading 6', class: 'ck-heading_heading6' }
+				{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }
 			]
 		}
 	} )

+ 8 - 12
packages/ckeditor5-heading/docs/features/headings.md

@@ -36,7 +36,7 @@ Use toolbar dropdown to style a heading, or type # or more (depending on the hea
 
 ## Heading buttons
 
-The heading feature lets you also use a set of heading buttons instead of the dropdown list. The toolbar buttons are configurable and it is possible to include a paragraph button, too. Compare the heading toolbar dropdown from above demo with the heading buttons below to check the functionality and usability of this variation.
+The heading feature lets you also use a set of heading buttons instead of the dropdown list. The toolbar buttons are configurable and it is possible to include a paragraph button, too. Compare the heading toolbar dropdown from the demo above with the heading buttons below to check the functionality and usability of this variation.
 
 {@snippet features/heading-buttons}
 
@@ -46,15 +46,15 @@ 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/lists Lists}  &ndash; Organize your content better with ordered and unordered lists you can style.
 * {@link features/remove-format Remove format} &ndash; Easily clean basic text formatting.
-* {@link features/autoformat Autoformatting} &ndash; Add formatting elements as you type with Markdown code.
+* {@link features/autoformat Autoformatting} &ndash; Add formatting elements (such as headings) as you type with Markdown code.
 
 ## 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.
+You can configure which heading levels the editor will 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.
 
 For example, the following editor will support only two levels of headings &mdash; `<h1>` and `<h2>`:
 
@@ -137,11 +137,11 @@ ClassicEditor
 
 ### Configuring toolbar buttons
 
-In order to use toolbar buttons instead of heading dropdown, you need to properly configure the feature. You also need to import proper UI elements; see the [installation section](#installation-with-toolbar-heading-buttons) for instructions on how to do it.
+In order to use individual toolbar buttons instead of the heading dropdown, you need to properly configure the feature. You also need to import proper UI elements; see the [installation section](#installation-with-toolbar-heading-buttons) for instructions on how to do it.
 
 ```js
 ClassicEditor
-	.create( document.querySelector( '#snippet-heading-buttons' ), {
+	.create( document.querySelector( '#editor' ), {
 		toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6', '|', 'undo', 'redo' ],
 		heading: {
 			options: [
@@ -155,12 +155,8 @@ ClassicEditor
 			]
 		}
 	} )
-	.then( editor => {
-		window.editor = editor;
-	} )
-	.catch( err => {
-		console.error( err.stack );
-	} );
+	.then( ... )
+    .catch( ... );
 ```
 {@snippet features/custom-heading-buttons}