Skip to content

BlockSuite API Documentation / @blocksuite/virgo / VirgoAttributeService

Class: VirgoAttributeService<TextAttributes> ​

Contents ​

Type parameters ​

• TextAttributes extends BaseTextAttributes

Constructors ​

new VirgoAttributeService(editor) ​

new VirgoAttributeService<TextAttributes>(editor): VirgoAttributeService<TextAttributes>

Parameters ​

• editor: VEditor<TextAttributes>

Returns ​

VirgoAttributeService<TextAttributes>

Source ​

packages/virgo/src/services/attribute.ts:21

Properties ​

_attributeRenderer ​

private _attributeRenderer: AttributeRenderer<TextAttributes>

Source ​

packages/virgo/src/services/attribute.ts:15


_attributeSchema ​

private _attributeSchema: ZodType<TextAttributes, ZodTypeDef, unknown>

Source ​

packages/virgo/src/services/attribute.ts:18


_marks ​

private _marks: null | TextAttributes = null

Source ​

packages/virgo/src/services/attribute.ts:13


editor ​

readonly editor: VEditor<TextAttributes>

Source ​

packages/virgo/src/services/attribute.ts:21

Accessors ​

attributeRenderer ​

get attributeRenderer(): AttributeRenderer<TextAttributes>

Returns ​

AttributeRenderer<TextAttributes>

Source ​

packages/virgo/src/services/attribute.ts:27


marks ​

get marks(): null | TextAttributes

Returns ​

null | TextAttributes

Source ​

packages/virgo/src/services/attribute.ts:23

Methods ​

getFormat() ​

getFormat(vRange, loose): TextAttributes

Parameters ​

• vRange: VRange

• loose: boolean= false

Returns ​

TextAttributes

Source ​

packages/virgo/src/services/attribute.ts:49


normalizeAttributes() ​

normalizeAttributes(textAttributes?): undefined | TextAttributes

Parameters ​

• textAttributes?: TextAttributes

Returns ​

undefined | TextAttributes

Source ​

packages/virgo/src/services/attribute.ts:89


resetMarks() ​

resetMarks(): void

Returns ​

void

Source ​

packages/virgo/src/services/attribute.ts:35


setAttributeRenderer() ​

setAttributeRenderer(renderer): void

Parameters ​

• renderer: AttributeRenderer<TextAttributes>

Returns ​

void

Source ​

packages/virgo/src/services/attribute.ts:45


setAttributeSchema() ​

setAttributeSchema(schema): void

Parameters ​

• schema: ZodType<TextAttributes, ZodTypeDef, unknown>

Returns ​

void

Source ​

packages/virgo/src/services/attribute.ts:39


setMarks() ​

setMarks(marks): void

Parameters ​

• marks: TextAttributes

Returns ​

void

Source ​

packages/virgo/src/services/attribute.ts:31


Generated using typedoc-plugin-markdown and TypeDoc