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

Docs: Fixed and extended documentation of enableToolbarKeyboardFocus() helper and ContextualToolbar plugin.

Aleksander Nowodzinski 8 лет назад
Родитель
Сommit
ee6ef9a99a

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

@@ -144,7 +144,7 @@ export default class ContextualToolbar extends Plugin {
 	}
 
 	/**
-	 * Adds panel view to the {@link: #_balloon} and attaches panel to the selection.
+	 * Shows the toolbar and attaches it to the selection.
 	 *
 	 * Fires {@link #event:beforeShow} event just before displaying the panel.
 	 */
@@ -185,7 +185,7 @@ export default class ContextualToolbar extends Plugin {
 	}
 
 	/**
-	 * Removes the toolbar from the {@link: #_balloon} which hides it.
+	 * Hides the toolbar.
 	 */
 	hide() {
 		if ( this._balloon.hasView( this.toolbarView ) ) {

+ 4 - 0
packages/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus.js

@@ -19,6 +19,10 @@
  * for `options.origin`.
  * @param {module:ui/toolbar/toolbarview~ToolbarView} options.toolbar A toolbar which is to gain
  * focus when `Alt+F10` is pressed.
+ * @param {Function} [options.beforeFocus] A callback executed before the `options.toolbar` gains focus
+ * upon the `Alt+F10` keystroke.
+ * @param {Function} [options.afterBlur] A callback executed after `options.toolbar` loses focus upon
+ * `Esc` keystroke but before the focus goes back to `options.origin`.
  */
 export default function enableToolbarKeyboardFocus( {
 	origin,