8
0
Kamil Piechaczek 6 лет назад
Родитель
Сommit
251f7b3c07
1 измененных файлов с 12 добавлено и 0 удалено
  1. 12 0
      packages/ckeditor5-horizontal-line/docs/features/horizontal-rule.md

+ 12 - 0
packages/ckeditor5-horizontal-line/docs/features/horizontal-rule.md

@@ -29,6 +29,7 @@ import HorizontalRule from '@ckeditor/ckeditor5-horizontal-rule/src/horizontalru
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
 		plugins: [ HorizontalRule, ... ],
+		toolbar: [ 'horizontalRule', ... ],
 	} )
 	.then( ... )
 	.catch( ... );
@@ -38,6 +39,17 @@ ClassicEditor
 	Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
 </info-box>
 
+## Common API
+
+The {@link module:horizontal-rule/horizontalrule~HorizontalRule} plugin registers the UI button component (`'horizontalRule'`) and the `'horizontalRule'` command implemented by {@link module:horizontal-rule/horizontalrulecommand~HorizontalRuleCommand}. 
+
+The command can be executed using the {@link module:core/editor/editor~Editor#execute `editor.execute()`} method:
+
+```js
+// Inserts the horizontal rule to the selected content.
+editor.execute( 'horizontalRule' );
+```
+
 ## Contribute
 
 The source code of the feature is available on GitHub in https://github.com/ckeditor/ckeditor5-horizontal-rule.