API > @blocksuite/virgo > VirgoAttributeService
Class: VirgoAttributeService<TextAttributes>
​
Constructors ​
constructor ​
new VirgoAttributeService<
TextAttributes
>(editor
):VirgoAttributeService
<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 > |
Returns ​
VirgoAttributeService
< TextAttributes
>
Defined In ​
packages/virgo/src/services/attribute.ts:21
Properties ​
_attributeRenderer ​
private
_attributeRenderer:AttributeRenderer
<TextAttributes
>
Defined In ​
packages/virgo/src/services/attribute.ts:15
_attributeSchema ​
private
_attributeSchema:ZodType
<TextAttributes
,ZodTypeDef
,unknown
>
Defined In ​
packages/virgo/src/services/attribute.ts:18
_marks ​
private
_marks:null
|TextAttributes
=null
Defined In ​
packages/virgo/src/services/attribute.ts:13
editor ​
readonly
editor:VEditor
<TextAttributes
>
Defined In ​
packages/virgo/src/services/attribute.ts:21
Accessors ​
attributeRenderer ​
get
attributeRenderer():AttributeRenderer
<TextAttributes
>
Defined In ​
packages/virgo/src/services/attribute.ts:27
marks ​
get
marks():null
|TextAttributes
Defined In ​
packages/virgo/src/services/attribute.ts:23
Methods ​
getFormat ​
getFormat(
vRange
,loose
=false
):TextAttributes
Parameters ​
Parameter | Type | Default value |
---|---|---|
vRange | VRange | undefined |
loose | boolean | false |
Returns ​
TextAttributes
Defined In ​
packages/virgo/src/services/attribute.ts:49
normalizeAttributes ​
normalizeAttributes(
textAttributes
?):undefined
|TextAttributes
Parameters ​
Parameter | Type |
---|---|
textAttributes ? | TextAttributes |
Returns ​
undefined
| TextAttributes
Defined In ​
packages/virgo/src/services/attribute.ts:89
resetMarks ​
resetMarks():
void
Returns ​
void
Defined In ​
packages/virgo/src/services/attribute.ts:35
setAttributeRenderer ​
setAttributeRenderer(
renderer
):void
Parameters ​
Parameter | Type |
---|---|
renderer | AttributeRenderer < TextAttributes > |
Returns ​
void
Defined In ​
packages/virgo/src/services/attribute.ts:45
setAttributeSchema ​
setAttributeSchema(
schema
):void
Parameters ​
Parameter | Type |
---|---|
schema | ZodType < TextAttributes , ZodTypeDef , unknown > |
Returns ​
void
Defined In ​
packages/virgo/src/services/attribute.ts:39
setMarks ​
setMarks(
marks
):void
Parameters ​
Parameter | Type |
---|---|
marks | TextAttributes |
Returns ​
void
Defined In ​
packages/virgo/src/services/attribute.ts:31