-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): Document QEditor.caret computedProp (#14476)
- Loading branch information
1 parent
39efb28
commit b4956c0
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// src/components/editor/editor-caret.js#Caret | ||
// We are not exposing the whole API, just the ones that might be needed outside. | ||
export interface QEditorCaret { | ||
readonly selection: Selection | null; | ||
readonly hasSelection: boolean; | ||
readonly range: Range | null; | ||
readonly parent: Element | null; | ||
readonly blockParent: Element | null; | ||
|
||
save(range: Range): void; | ||
restore(range?: Range): void; | ||
savePosition(): void; | ||
restorePosition(length?: number): void; | ||
is(commandId: string, param?: string): boolean; | ||
can(commandId: string): boolean; | ||
apply(commandId: string, param?: string, done?: () => void): boolean; | ||
} |