8
0
Просмотр исходного кода

Added tests to ParagraphButtonUI class.

Szymon Kupś 7 лет назад
Родитель
Сommit
1305b57b92
1 измененных файлов с 16 добавлено и 0 удалено
  1. 16 0
      packages/ckeditor5-paragraph/src/paragraphbuttonui.js

+ 16 - 0
packages/ckeditor5-paragraph/src/paragraphbuttonui.js

@@ -11,6 +11,22 @@ import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import icon from '../theme/icons/paragraph.svg';
 
+/**
+ * Class creates UI component representing paragraph button. It can be used together with
+ * {@link module:heading/headingbuttonsui~HeadingButtonsUI} to replace heading dropdown used in toolbars.
+ *
+ * This plugin is not loaded automatically with {@link module:paragraph/paragraph~Paragraph paragraph plugin}. It must
+ * be added manually in order to use `paragraph` component.
+ *
+ *		ClassicEditor
+ *			.create( {
+ *				plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]
+ * 				toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]
+ *			} )
+ *			.then( ... )
+ *			.catch( ... );
+ *
+ */
 export default class ParagraphButtonUI extends Plugin {
 	init() {
 		const editor = this.editor;