ソースを参照

Fixed context info about new focus() shorthand method

Paweł Smyrek 5 年 前
コミット
0307c330c9

+ 1 - 1
docs/framework/guides/architecture/ui-library.md

@@ -443,7 +443,7 @@ dropdownView.bind( 'isEnabled' ).toMany( buttons, 'isEnabled',
 
 ### Best practices
 
-It is advised that for the best user experience the editing view gets {@link module:engine/view/view~View#focus focused} upon any user action (e.g. executing a command) to make sure the editor retains focus:
+It is advised that for the best user experience the editing view gets {@link module:core/editor/editor~Editor#focus focused} upon any user action (e.g. executing a command) to make sure the editor retains focus:
 
 ```js
 // Execute some action on dropdown#execute event.

+ 2 - 2
packages/ckeditor5-ui/docs/framework/guides/deep-dive/focus-tracking.md

@@ -70,13 +70,13 @@ To spice things up even more, you should also know `isFocused` will change when
 
 ### How to focus the editor?
 
-Say, for instance, your application wants to focus an editable area of CKEditor 5 when a certain action is executed (e.g. a button is clicked). To do that, use the {@link module:engine/view/view~View#focus `focus()`} method of the editing view:
+Say, for instance, your application wants to focus an editable area of CKEditor 5 when a certain action is executed (e.g. a button is clicked). To do that, use the {@link module:core/editor/editor~Editor#focus `focus()`} method of the editor:
 
 ```js
 editor.focus();
 ```
 
-This snippet focuses an editable that has the selection. If the editor has not been focused yet, this will focus the very first editable. If an editor has multiple editing roots and the user was editing content, focus will be brought back where the user left off.
+This method focuses an editable that has the selection. If the editor has not been focused yet, this will focus the very first editable. If an editor has multiple editing roots and the user was editing content, focus will be brought back where the user left off.
 
 <info-box>
 	Focusing an editor does not change its selection. If you want to focus an editor and move the caret to a specific position, you should call `editor.focus()` first and then use the {@link module:engine/model/writer~Writer#setSelection `setSelection()`} method of the {@link framework/guides/architecture/editing-engine#model model writer} to change the selection.