Przeglądaj źródła

Docs: Introduced config docs.

Piotrek Koszuliński 8 lat temu
rodzic
commit
eddf0d559e

+ 19 - 0
packages/ckeditor5-ui/src/toolbar/contextual/contextualtoolbar.js

@@ -266,3 +266,22 @@ function getBalloonPositions( isBackward ) {
 		defaultPositions.northEastArrowSouthWest
 	];
 }
+
+/**
+ * Contextual toolbar configuration. Used by the {@link module:ui/toolbar/contextual/contextualtoolbar~ContextualToolbar}
+ * feature.
+ *
+ *		const config = {
+ *			contextualToolbar: [ 'bold', 'italic', 'undo', 'redo' ]
+ *		};
+ *
+ * You can also use `'|'` to create a separator between groups of items:
+ *
+ *		const config = {
+ *			contextualToolbar: [ 'bold', 'italic', | 'undo', 'redo' ]
+ *		};
+ *
+ * Read also about configuring the main editor toolbar in {@link module:core/editor/editorconfig~EditorConfig#toolbar}.
+ *
+ * @member {Array.<String>} module:core/editor/editorconfig~EditorConfig#contextualToolbar
+ */