📉
slate-transcript-editor-docs
  • Slate Transcript Editor - Docs
  • notes
    • Apple script testing
    • css-injection-karaoke
    • insert-text-at-selection
    • set-selection
    • notes
    • web workers
    • Takeaways form draftJs vs Slate
    • pause-while-typing
    • verbose-generate-previous-timings-up-to-current-func
  • ADR
    • [short title of solved problem and solution] - ADR Template
Powered by GitBook
On this page

Was this helpful?

  1. notes

set-selection

Previousinsert-text-at-selectionNextnotes

Last updated 3 years ago

Was this helpful?

editor.apply({
  type: 'set_selection',
  properties: {
    anchor: { path: [0, 0], offset: 0 },
  },
  newProperties: {
    anchor: { path: [0, 0], offset: 15 },
  },
})

break on selection

Editor.insertBreak(editor)

select whole editor for range, from

Editor.range(editor, [])
const wholeTranscriptSelection =  Editor.range(editor, []);
Transforms.setSelection(editor, wholeTranscriptSelection)
https://docs.slatejs.org/concepts/05-operations
Slate slack