浏览代码

Improved API docs.

Piotrek Koszuliński 8 年之前
父节点
当前提交
869276c67b
共有 2 个文件被更改,包括 16 次插入14 次删除
  1. 1 1
      packages/ckeditor5-heading/docs/features/headings.md
  2. 15 13
      packages/ckeditor5-heading/src/heading.js

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

@@ -59,7 +59,7 @@ For example, the following editor will support the following two heading options
 
 ```html
 <style>
-	// Style for the heading in the content and for the dropdown item.
+	// Styles for the heading in the content and for the dropdown item.
 	h2.fancy, .ck-heading_heading2_fancy {
 		color: #ff0050;
 		font-size: 1.3em;

+ 15 - 13
packages/ckeditor5-heading/src/heading.js

@@ -162,19 +162,6 @@ function getCommandsBindingTargets( commands, attribute ) {
 }
 
 /**
- * Heading option descriptor. Compatible with {@link module:engine/conversion/definition-based-converters~ConverterDefinition}.
- *
- * @typedef {Object} module:heading/heading~HeadingOption
- * @property {String} model Element's name in the model.
- * @property {module:engine/view/viewelementdefinition~ViewElementDefinition} view The name of the view element
- * or {@link module:engine/view/viewelementdefinition~ViewElementDefinition} that will be used to represent the model element in the view.
- * @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.
- * @property {Array.<module:engine/view/viewelementdefinition~ViewElementDefinition>} acceptAlso An array with all matched elements that
- * view to model conversion should also accept.
- */
-
-/**
  * The configuration of the heading feature. Introduced by the {@link module:heading/headingengine~HeadingEngine} feature.
  *
  * Read more in {@link module:heading/heading~HeadingConfig}.
@@ -223,6 +210,9 @@ function getCommandsBindingTargets( commands, attribute ) {
  * the {@link module:paragraph/paragraph~Paragraph} feature (which is required by
  * the {@link module:heading/headingengine~HeadingEngine} 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.
@@ -234,3 +224,15 @@ function getCommandsBindingTargets( commands, attribute ) {
  *
  * @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.
+ */