harmony 鸿蒙Input Method Framework Subsystem – Input Method Framework Service Changelog
Input Method Framework Subsystem – Input Method Framework Service Changelog
cl.imf.1 Addition of Synchronous APIs for InputClient
The synchronous APIs listed below are added.
API | Description |
---|---|
getForwardSync(length:number): string | Obtains the specific-length text before the cursor. |
getBackwardSync(length:number): string | Obtains the specific-length text after the cursor. |
deleteForwardSync(length:number): void | Deletes the fixed-length text before the cursor. |
deleteBackwardSync(length:number): void | Deletes the fixed-length text after the cursor. |
insertTextSync(text: string): void | Inserts text. |
getEditorAttributeSync(): EditorAttribute | Obtains the attribute of the edit box. |
moveCursorSync(direction: number): void | Moves the cursor. |
selectByRangeSync(range: Range): void | Selects text based on the specified range. |
selectByMovementSync(movement: Movement): void | Selects text based on the cursor movement direction. |
getTextIndexAtCursorSync(): number | Obtains the index of the text where the cursor is located. |
Change Impact
The preceding APIs are synchronous APIs.
Adaptation Guide
Follow the description in @ohos.inputMethodEngine.d.ts
你可能感兴趣的鸿蒙文章
harmony 鸿蒙ArkUI Subsystem Changelog
harmony 鸿蒙Application Access Control Subsystem Changelog
harmony 鸿蒙Account Subsystem Changelog
harmony 鸿蒙Bluetooth Subsystem Changelog
harmony 鸿蒙Bundle Management Subsystem Changelog
harmony 鸿蒙Security Subsystem Changelog
harmony 鸿蒙Graphics Subsystem Changelog
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦