Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Docs: Removed duplicated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
scofalik committed Feb 23, 2018
1 parent ec4f30f commit 2843d17
Showing 1 changed file with 0 additions and 76 deletions.
76 changes: 0 additions & 76 deletions src/headingui.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,79 +124,3 @@ export default class HeadingUI extends Plugin {
} );
}
}

/**
* The configuration of the heading feature. Introduced by the {@link module:heading/headingediting~HeadingEditing} feature.
*
* Read more in {@link module:heading/heading~HeadingConfig}.
*
* @member {module:heading/heading~HeadingConfig} module:core/editor/editorconfig~EditorConfig#heading
*/

/**
* The configuration of the heading feature.
* The option is used by the {@link module:heading/headingediting~HeadingEditing} feature.
*
* ClassicEditor
* .create( {
* heading: ... // Heading feature config.
* } )
* .then( ... )
* .catch( ... );
*
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
*
* @interface HeadingConfig
*/

/**
* The available heading options.
*
* The default value is:
*
* const headingConfig = {
* options: [
* { 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' }
* ]
* };
*
* It defines 3 levels of headings. In the editor model they will use `heading1`, `heading2`, and `heading3` elements.
* Their respective view elements (so the elements output by the editor) will be: `h2`, `h3`, and `h4`. This means that
* if you choose "Heading 1" in the headings dropdown the editor will turn the current block to `<heading1>` in the model
* which will result in rendering (and outputting to data) the `<h2>` element.
*
* The `title` and `class` properties will be used by the `headings` dropdown to render available options.
* Usually, the first option in the headings dropdown is the "Paragraph" option, hence it's also defined on the list.
* However, you don't need to define its view representation because it's handled by
* the {@link module:paragraph/paragraph~Paragraph} feature (which is required by
* the {@link module:heading/headingediting~HeadingEditing} feature).
*
* You can **read more** about configuring heading levels and **see more examples** in
* the {@glink features/headings Headings} guide.
*
* Note: In the model you should always start from `heading1`, regardless of how the headings are represented in the view.
* That's assumption is used by features like {@link module:autoformat/autoformat~Autoformat} to know which element
* they should use when applying the first level heading.
*
* The defined headings are also available in {@link module:core/commandcollection~CommandCollection} under their model names.
* For example, the below code will apply `<heading1>` to the current selection:
*
* editor.execute( 'heading1' );
*
* @member {Array.<module:heading/heading~HeadingOption>} module:heading/heading~HeadingConfig#options
*/

/**
* Heading option descriptor.
*
* This format is compatible with {@link module:engine/conversion/definition-based-converters~ConverterDefinition}
* and adds to additional properties: `title` and `class`.
*
* @typedef {Object} module:heading/heading~HeadingOption
* @extends module:engine/conversion/definition-based-converters~ConverterDefinition
* @property {String} title The user-readable title of the option.
* @property {String} class The class which will be added to the dropdown item representing this option.
*/

0 comments on commit 2843d17

Please sign in to comment.