API > @blocksuite/virgo > VirgoHookService
Class: VirgoHookService<TextAttributes> ​
Constructors ​
constructor ​
new VirgoHookService<
TextAttributes>(editor,hooks={}):VirgoHookService<TextAttributes>
Type parameters ​
| Parameter | 
|---|
TextAttributes extends {bold: null | true; code: null | true; italic: null | true; link: null | string; strike: null | true; underline: null | true;} | 
Parameters ​
| Parameter | Type | 
|---|---|
editor | VEditor< TextAttributes > | 
hooks | object | 
hooks.beforeinput? | function | 
hooks.compositionEnd? | function | 
Returns ​
VirgoHookService< TextAttributes >
Defined In ​
packages/virgo/src/services/hook.ts:29
Properties ​
editor ​
readonlyeditor:VEditor<TextAttributes>
Defined In ​
packages/virgo/src/services/hook.ts:30
hooks ​
readonlyhooks:object={}
Type declaration ​
hooks.beforeinput​
optionalbeforeinput:functionParameters ​
Parameter Type propsVBeforeinputHookCtx<TextAttributes>Returns ​
null|VBeforeinputHookCtx<TextAttributes>
hooks.compositionEnd​
optionalcompositionEnd:functionParameters ​
Parameter Type propsVCompositionEndHookCtx<TextAttributes>Returns ​
null|VCompositionEndHookCtx<TextAttributes>
Defined In ​
packages/virgo/src/services/hook.ts:31