Skip to content

BlockSuite API Documentation / @blocksuite/inline / InlineHookService

Class: InlineHookService<TextAttributes> ​

Contents ​

Type parameters ​

• TextAttributes extends BaseTextAttributes

Constructors ​

new InlineHookService(editor, hooks) ​

new InlineHookService<TextAttributes>(editor, hooks): InlineHookService<TextAttributes>

Parameters ​

• editor: InlineEditor<TextAttributes>

• hooks: Object= {}

• hooks.beforeinput?: (props) => null | BeforeinputHookCtx<TextAttributes>

• hooks.compositionEnd?: (props) => null | CompositionEndHookCtx<TextAttributes>

Returns ​

InlineHookService<TextAttributes>

Source ​

packages/inline/src/services/hook.ts:27

Properties ​

editor ​

readonly editor: InlineEditor<TextAttributes>

Source ​

packages/inline/src/services/hook.ts:28


hooks ​

readonly hooks: Object = {}

Type declaration ​

beforeinput? ​

beforeinput?: (props) => null | BeforeinputHookCtx<TextAttributes>

Parameters ​

• props: BeforeinputHookCtx<TextAttributes>

Returns ​

null | BeforeinputHookCtx<TextAttributes>

compositionEnd? ​

compositionEnd?: (props) => null | CompositionEndHookCtx<TextAttributes>

Parameters ​

• props: CompositionEndHookCtx<TextAttributes>

Returns ​

null | CompositionEndHookCtx<TextAttributes>

Source ​

packages/inline/src/services/hook.ts:29


Generated using typedoc-plugin-markdown and TypeDoc