Skip to content

BlockSuite API Documentation / @blocksuite/affine-widget-frame-title

@blocksuite/affine-widget-frame-title ​

Classes ​

AffineFrameTitleWidget ​

Extends ​

Constructors ​

Other ​

render() ​

render(): TemplateResult<1>

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 ​

TemplateResult<1>

Overrides ​

WidgetComponent.render

attributes ​

controllers ​

dev-mode ​

lifecycle ​

properties ​

rendering ​

styles ​

updates ​


EdgelessFrameTitleEditor ​

Extends ​

Constructors ​

Other ​

styles ​

static styles: CSSResult

Overrides ​

WithDisposable( ShadowlessElement ).styles

edgeless ​
editorHost ​
Get Signature ​

get editorHost(): EditorHost

Returns ​

EditorHost

frameModel ​
gfx ​
Get Signature ​

get gfx(): GfxController

Returns ​

GfxController

inlineEditor ​
Get Signature ​

get inlineEditor(): AffineInlineEditor | null | undefined

Returns ​

AffineInlineEditor | null | undefined

richText ​
selection ​
Get Signature ​

get selection(): GfxSelectionManager

Returns ​

GfxSelectionManager

connectedCallback() ​

connectedCallback(): void

Returns ​

void

Overrides ​

WithDisposable( ShadowlessElement ).connectedCallback

attributes ​

controllers ​

dev-mode ​

lifecycle ​

properties ​

rendering ​

render() ​

render(): TemplateResult<1> | typeof nothing

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 ​

TemplateResult<1> | typeof nothing

Overrides ​

WithDisposable( ShadowlessElement ).render

styles ​

updates ​

firstUpdated() ​

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 ​

WithDisposable( ShadowlessElement ).firstUpdated

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 ​

WithDisposable( ShadowlessElement ).getUpdateComplete

Variables ​

AFFINE_FRAME_TITLE_WIDGET ​

const AFFINE_FRAME_TITLE_WIDGET: "affine-frame-title-widget" = 'affine-frame-title-widget'


frameTitleStyle ​

const frameTitleStyle: CSSResult


frameTitleStyleVars ​

const frameTitleStyleVars: object

Type Declaration ​

fontSize ​

fontSize: number = 14

height ​

height: number = 22

nestedFrameOffset ​

nestedFrameOffset: number = 4


frameTitleWidget ​

const frameTitleWidget: ExtensionType

Functions ​

mountFrameTitleEditor() ​

mountFrameTitleEditor(frame, edgeless): void

Parameters ​

frame ​

FrameBlockModel

edgeless ​

BlockComponent

Returns ​

void