瀏覽代碼

Add Common API section to the lists feature guide.

Maciej Gołaszewski 5 年之前
父節點
當前提交
940cfde2e9
共有 1 個文件被更改,包括 27 次插入3 次删除
  1. 27 3
      packages/ckeditor5-list/docs/features/lists.md

+ 27 - 3
packages/ckeditor5-list/docs/features/lists.md

@@ -4,7 +4,7 @@ category: features
 
 # Lists
 
-The {@link module:list/list~List} feature allows creating ordered and unordered lists in the editor.
+The {@link module:list/list~List list} feature allows creating ordered and unordered lists in the editor.
 
 <info-box info>
 	The feature is enabled by default in all CKEditor 5 WYSIWYG editor builds.
@@ -22,7 +22,7 @@ Use the editor below to see the list feature plugin in action.
 
 ## List styles
 
-The {@link module:list/liststyle~ListStyle list styles} feature allows customizing the list's marker. 
+The {@link module:list/liststyle~ListStyle list styles} feature allows customizing the list's marker.
 
 ### Demo
 
@@ -57,13 +57,37 @@ ClassicEditor
 </info-box>
 
 <info-box warning>
-	The {@link module:list/liststyle~ListStyle} feature overrides implementations from the {@link module:list/listui~ListUI} because they share the same names.
+	The {@link module:list/liststyle~ListStyle} feature overrides UI button implementations from the {@link module:list/listui~ListUI}.
 </info-box>
 
 ## 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:
+
+* The {@link module:list/listcommand~ListCommand `'numberedList'`} command.
+* The {@link module:list/listcommand~ListCommand `'bulletedList'`} command.
+* The {@link module:list/indentcommand~IndentCommand `'indentList'`} command.
+* The {@link module:list/indentcommand~IndentCommand `'outdentList'`} command.
+* The `'numberedList'` ui button.
+* The `'bulletedList'` ui button.
+
+The {@link module:list/liststyle~ListStyle} plugin registers:
+
+* The {@link module:list/liststylecommand~ListStyleCommand `'listStyle'`} command that accepts a `type` of a list style to set.
+    ```js
+    editor.execute( 'listStyle', { type: 'decimal' } );
+    ```
+    The available types are:
+
+    * For bulleted lists: `'disc'`, `'circle'`, and `'square'`.
+    * For numbered lists: `'decimal'`, `'decimal-leading-zero'`, `'lower-roman'`, `'upper-roman'`, `'lower-latin'`, and `'upper-latin'`.
+* The `'numberedList'` ui split button (it overrides UI button registered by the `List` plguin.
+* The `'bulletedList'` ui split button (it overrides UI button registered by the `List` plguin.
+
 ## Contribute
 
 The source code of the feature is available on GitHub in https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-list.