Bladeren bron

Docs: Updated Title and Headings guide.

Anna Tomanek 6 jaren geleden
bovenliggende
commit
7c5389acdc

+ 7 - 3
packages/ckeditor5-heading/docs/features/headings.md

@@ -14,12 +14,16 @@ The {@link module:heading/heading~Heading} feature enables support for headings.
 
 ## Heading levels
 
-By default this feature is configured to support `<h2>`, `<h3>` and `<h4>` elements which are named: "Heading 1", "Heading 2" and "Heading 3", respectively. The rationale behind starting from `<h2>` is that `<h1>` should be reserved for the page's main title and the page content will usually start from `<h2>`.
+By default this feature is configured to support `<h2>`, `<h3>` and `<h4>` elements which are named: "Heading 1", "Heading 2" and "Heading 3", respectively. The rationale behind starting from `<h2>` is that `<h1>` should be reserved for the {@link features/title page's main title} and the page content will usually start from `<h2>`.
 
-Additionally, the `<h1>` element is supported when pasting into the editor and is converted to `<h2>` ("Heading 1") by default.
+<info-box hint>
+	Support for adding a document title is provided through the {@link module:heading/title~Title} plugin. This plugin is optional and needs to be {@link builds/guides/integration/installing-plugins added to your editor build}. When it is enabled, a `<h1>` element pasted into the editor will be rendered as the {@link features/title document title}.
+</info-box>
+
+By default, when your editor build does not include the title plugin, a `<h1>` element pasted into the rich-text editor is converted to `<h2>` ("Heading 1").
 
 <info-box hint>
-	You can read more about why the editor should not create `<h1>` elements in the [Headings section of Editor Recommendations](http://ckeditor.github.io/editor-recommendations/features/headings.html).
+	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>
 
 ### Configuring heading levels

+ 24 - 5
packages/ckeditor5-heading/docs/features/title.md

@@ -42,11 +42,30 @@ ClassicEditor
     .catch( ... );
 ```
 
-## Contribute
-
-The source code of the feature is available on GitHub in https://github.com/ckeditor/ckeditor5-heading.
-
 <info-box info>
-    Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
+	Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
 </info-box>
 
+## HTML structure
+
+When you call {@link module:core/editor/utils/dataapimixin~DataApi#function-getData `editor.getData()`}, the document title will be represented as the following HTML:
+
+```html
+<h1>Feasibility Study</h1>
+```
+
+### Model representation
+
+In the CKEditor 5 data model the document title is represented as follows:
+
+```html
+<title>
+	<title-content>
+		Feasibility Study
+	</title-content>
+</title>
+```
+
+## Contribute
+
+The source code of the feature is available on GitHub in https://github.com/ckeditor/ckeditor5-heading.