Skip to content

BlockSuite API Documentation / @blocksuite/inline / VLine

Class: VLine

Extends

  • LitElement

Constructors

new VLine()

new VLine(): VLine

Returns

VLine

Inherited from

LitElement.constructor

Defined in

node_modules/@lit/reactive-element/development/reactive-element.d.ts:504

Other

elements

Defined in

packages/framework/inline/src/components/v-line.ts:133


endOffset

Defined in

packages/framework/inline/src/components/v-line.ts:136


index

Defined in

packages/framework/inline/src/components/v-line.ts:139


inlineEditor

Get Signature

get inlineEditor(): InlineEditor<{ bold: null | true; code: null | true; italic: null | true; link: null | string; strike: null | true; underline: null | true; }>

Returns

InlineEditor<{ bold: null | true; code: null | true; italic: null | true; link: null | string; strike: null | true; underline: null | true; }>

Defined in

packages/framework/inline/src/components/v-line.ts:14


startOffset

Defined in

packages/framework/inline/src/components/v-line.ts:142


vElements

Get Signature

get vElements(): VElement<{ bold: null | true; code: null | true; italic: null | true; link: null | string; strike: null | true; underline: null | true; }>[]

Returns

VElement<{ bold: null | true; code: null | true; italic: null | true; link: null | string; strike: null | true; underline: null | true; }>[]

Defined in

packages/framework/inline/src/components/v-line.ts:28


vTextContent

Get Signature

get vTextContent(): string

Returns

string

Defined in

packages/framework/inline/src/components/v-line.ts:32


vTextLength

Get Signature

get vTextLength(): number

Returns

number

Defined in

packages/framework/inline/src/components/v-line.ts:36


vTexts

Get Signature

get vTexts(): VText[]

Returns

VText[]

Defined in

packages/framework/inline/src/components/v-line.ts:41


renderVElements()

renderVElements(): TemplateResult<1>

Returns

TemplateResult<1>

Defined in

packages/framework/inline/src/components/v-line.ts:84

rendering

createRenderRoot()

createRenderRoot(): VLine

Returns

VLine

Overrides

LitElement.createRenderRoot

Defined in

packages/framework/inline/src/components/v-line.ts:45


render()

render(): undefined | TemplateResult

Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html's ChildPart - typically a TemplateResult. Setting properties inside this method will not trigger the element to update.

Returns

undefined | TemplateResult

Overrides

LitElement.render

Defined in

packages/framework/inline/src/components/v-line.ts:75

updates

firstUpdated()

protected firstUpdated(): void

Invoked when the element is first updated. Implement to perform one time work on the element after update.

ts
firstUpdated() {
  this.renderRoot.getElementById('my-text-area').focus();
}

Setting properties inside this method will trigger the element to update again after this update cycle completes.

Returns

void

Overrides

LitElement.firstUpdated

Defined in

packages/framework/inline/src/components/v-line.ts:49


getUpdateComplete()

getUpdateComplete(): Promise<boolean>

Override point for the updateComplete promise.

It is not safe to override the updateComplete getter directly due to a limitation in TypeScript which means it is not possible to call a superclass getter (e.g. super.updateComplete.then(...)) when the target language is ES5 (https://github.com/microsoft/TypeScript/issues/338). This method should be overridden instead. For example:

ts
class MyElement extends LitElement {
  override async getUpdateComplete() {
    const result = await super.getUpdateComplete();
    await this._myChild.updateComplete;
    return result;
  }
}

Returns

Promise<boolean>

A promise of a boolean that resolves to true if the update completed without triggering another update.

Overrides

LitElement.getUpdateComplete

Defined in

packages/framework/inline/src/components/v-line.ts:69