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 ​
readonly
editor:VEditor
<TextAttributes
>
Defined In ​
packages/virgo/src/services/hook.ts:30
hooks ​
readonly
hooks:object
={}
Type declaration ​
hooks.beforeinput
​
optional
beforeinput:function
Parameters ​
Parameter Type props
VBeforeinputHookCtx
<TextAttributes
>Returns ​
null
|VBeforeinputHookCtx
<TextAttributes
>
hooks.compositionEnd
​
optional
compositionEnd:function
Parameters ​
Parameter Type props
VCompositionEndHookCtx
<TextAttributes
>Returns ​
null
|VCompositionEndHookCtx
<TextAttributes
>
Defined In ​
packages/virgo/src/services/hook.ts:31