Rich text / foldkit-richtext-dom/editor-bundle

focus

function · packages/richtext-dom/src/editor-bundle.ts:413

function focus(
  hostId: string,
  selection: RichText.Selection,
): Command.Command<Message>

Focuses the editor at hostId with selection in the browser, brought into view: for a control outside the editor that sends the reader into the text, such as a table of contents. The browser reports the selection back as Selected, so the Model follows it either way.