BlockSuite API Documentation / @blocksuite/presets / EdgelessEditor
Class: EdgelessEditor 
Extends 
ShadowlessElement<this> &DisposableClass<this>
Constructors 
new EdgelessEditor() 
new EdgelessEditor():
EdgelessEditor
Returns 
Inherited from 
SignalWatcher( WithDisposable(ShadowlessElement) ).constructor
Defined in 
node_modules/@lit/reactive-element/development/reactive-element.d.ts:504
Other 
_disposables 
protected_disposables:DisposableGroup
Inherited from 
SignalWatcher( WithDisposable(ShadowlessElement) )._disposables
Defined in 
packages/framework/global/dist/utils/with-disposable.d.ts:5
disposables 
readonlydisposables:DisposableGroup
Inherited from 
SignalWatcher( WithDisposable(ShadowlessElement) ).disposables
Defined in 
packages/framework/global/dist/utils/with-disposable.d.ts:6
virtualKeyboardPolicy 
virtualKeyboardPolicy:
string
Inherited from 
SignalWatcher( WithDisposable(ShadowlessElement) ).virtualKeyboardPolicy
Defined in 
packages/framework/global/dist/types/virtual-keyboard.d.ts:20
disableShadowRoot 
staticdisableShadowRoot:boolean
Inherited from 
SignalWatcher( WithDisposable(ShadowlessElement) ).disableShadowRoot
Defined in 
packages/framework/block-std/dist/view/element/shadowless-element.d.ts:4
styles 
staticstyles:CSSResult
Overrides 
SignalWatcher( WithDisposable(ShadowlessElement) ).styles
Defined in 
packages/presets/src/editors/edgeless-editor.ts:13
doc 
Defined in 
packages/presets/src/editors/edgeless-editor.ts:89
editor 
Defined in 
packages/presets/src/editors/edgeless-editor.ts:92
host 
gethost():null|EditorHost
Returns 
null | EditorHost
Defined in 
packages/presets/src/editors/edgeless-editor.ts:39
specs 
Defined in 
packages/presets/src/editors/edgeless-editor.ts:95
std 
Defined in 
packages/presets/src/editors/edgeless-editor.ts:98
lifecycle 
connectedCallback() 
connectedCallback():
void
Invoked when the component is added to the document's DOM.
In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.
connectedCallback() {
  super.connectedCallback();
  addEventListener('keydown', this._handleKeydown);
}Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().
Returns 
void
Overrides 
SignalWatcher( WithDisposable(ShadowlessElement) ).connectedCallback
Defined in 
packages/presets/src/editors/edgeless-editor.ts:47
rendering 
createRenderRoot() 
createRenderRoot():
HTMLElement|DocumentFragment
Returns 
HTMLElement | DocumentFragment
Inherited from 
SignalWatcher( WithDisposable(ShadowlessElement) ).createRenderRoot
Defined in 
packages/framework/block-std/dist/view/element/shadowless-element.d.ts:6
render() 
render(): typeof
nothing|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 
typeof nothing | TemplateResult<1>
Overrides 
SignalWatcher( WithDisposable(ShadowlessElement) ).render
Defined in 
packages/presets/src/editors/edgeless-editor.ts:64
styles 
finalizeStyles() 
protectedstaticfinalizeStyles(styles?):CSSResultOrNative[]
Takes the styles the user supplied via the static styles property and returns the array of styles to apply to the element. Override this method to integrate into a style management system.
Styles are deduplicated preserving the last instance in the list. This is a performance optimization to avoid duplicated styles that can occur especially when composing via subclassing. The last item is kept to try to preserve the cascade order with the assumption that it's most important that last added styles override previous styles.
Parameters 
• styles?: CSSResultGroup
Returns 
CSSResultOrNative[]
Nocollapse 
Inherited from 
SignalWatcher( WithDisposable(ShadowlessElement) ).finalizeStyles
Defined in 
packages/framework/block-std/dist/view/element/shadowless-element.d.ts:5
updates 
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:
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 
SignalWatcher( WithDisposable(ShadowlessElement) ).getUpdateComplete
Defined in 
packages/presets/src/editors/edgeless-editor.ts:58
willUpdate() 
willUpdate(
changedProperties):void
Invoked before update() to compute values needed during the update.
Implement willUpdate to compute property values that depend on other properties and are used in the rest of the update process.
willUpdate(changedProperties) {
  // only need to check changed properties for an expensive computation.
  if (changedProperties.has('firstName') || changedProperties.has('lastName')) {
    this.sha = computeSHA(`${this.firstName} ${this.lastName}`);
  }
}
render() {
  return html`SHA: ${this.sha}`;
}Parameters 
• changedProperties: Map<string | number | symbol, unknown>
Returns 
void
Overrides 
SignalWatcher( WithDisposable(ShadowlessElement) ).willUpdate
Defined in 
packages/presets/src/editors/edgeless-editor.ts:76