← Back to Input domain

Input.imeSetComposition

This method sets the current candidate text for IME. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.

Domain: Input experimental

Parameters

NameTypeDescription
textstringThe text to insert
selectionStartintegerselection start
selectionEndintegerselection end
replacementStart (optional)integerreplacement start
replacementEnd (optional)integerreplacement end

Example Request

{
  "id": 1,
  "method": "Input.imeSetComposition",
  "params": {
    "text": "text-value",
    "selectionStart": 1,
    "selectionEnd": 1
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('Input.imeSetComposition', {"text": "text-value", "selectionStart": 1, "selectionEnd": 1});
console.log(result);