Skip to content

BlockSuite API Documentation / @blocksuite/inline / AttributeService

Class: AttributeService<TextAttributes>

Type Parameters

TextAttributes extends BaseTextAttributes

Constructors

new AttributeService()

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

Parameters

editor: InlineEditor<TextAttributes>

Returns

AttributeService<TextAttributes>

Defined in

packages/framework/inline/src/services/attribute.ts:102

Properties

editor

readonly editor: InlineEditor<TextAttributes>

Defined in

packages/framework/inline/src/services/attribute.ts:102

Accessors

attributeRenderer

get attributeRenderer(): AttributeRenderer<TextAttributes>

Returns

AttributeRenderer<TextAttributes>

Defined in

packages/framework/inline/src/services/attribute.ts:94


marks

get marks(): null | TextAttributes

Returns

null | TextAttributes

Defined in

packages/framework/inline/src/services/attribute.ts:98

Methods

getFormat()

getFormat(inlineRange, loose): TextAttributes

Parameters

inlineRange: InlineRange

loose: boolean = false

Returns

TextAttributes

Defined in

packages/framework/inline/src/services/attribute.ts:21


normalizeAttributes()

normalizeAttributes(textAttributes?): undefined | TextAttributes

Parameters

textAttributes?: TextAttributes

Returns

undefined | TextAttributes

Defined in

packages/framework/inline/src/services/attribute.ts:61


resetMarks()

resetMarks(): void

Returns

void

Defined in

packages/framework/inline/src/services/attribute.ts:76


setAttributeRenderer()

setAttributeRenderer(renderer): void

Parameters

renderer: AttributeRenderer<TextAttributes>

Returns

void

Defined in

packages/framework/inline/src/services/attribute.ts:80


setAttributeSchema()

setAttributeSchema(schema): void

Parameters

schema: ZodType<TextAttributes, ZodTypeDef, unknown>

Returns

void

Defined in

packages/framework/inline/src/services/attribute.ts:84


setMarks()

setMarks(marks): void

Parameters

marks: TextAttributes

Returns

void

Defined in

packages/framework/inline/src/services/attribute.ts:90