❯ ~/robonen/tools
core
  • stdlibapi
  • platformapi
  • fetchapi
  • encodingapi
  • crdtapi
vue
  • vueapi
  • writekitapi
    ❯
    guide
    • Introduction
    • Playground
    • ❯addMark
    • ❯applyInputRule
    • ❯chainCommands
    • ❯convertBlock
    • ❯defaultTextType
    • ❯deleteSelection
    • ❯deleteSelectionInto
    • ❯duplicateBlock
    • ❯ensureNotEmpty
    • ❯exitAtom
    • ❯focusBlock
    • ❯indentListItem
    • ❯insertBlockBeside
    • ❯insertHardBreak
    • ❯insertSliceAt
    • ❯isBlockActive
    • ❯isMarkActive
    • ❯isTextBlockType
    • ❯joinBackward
    • ❯joinForward
    • ❯landingAfter
    • ❯moveBlockDown
    • ❯moveBlocks
    • ❯moveBlockUp
    • ❯outdentListItem
    • ❯removeBlock
    • ❯removeMark
    • ❯replaceSelection
    • ❯selectAll
    • ❯selectionBlockId
    • ❯setBlockType
    • ❯splitBlock
    • ❯toggleBlockType
    • ❯toggleChecked
    • ❯toggleMark
  • primitivesui
configs
  • eslintguide
  • tsconfigguide
  • tsdownguide
infra
  • renovateguide
@robonen/writekit/applyInputRule
V

applyInputRule

tested

Apply the first matching block input-rule at the caret. Rules live on block definitions (inputRules) and match the text from the block start to the caret — e.g. '# ' → heading, '- ' → bulleted list, '> ' → quote. Run from the input flow after each text change.

Source Tests

Signature

ts
const applyInputRule: Command
on this page
  • Signature