BlockSuite API Documentation / @blocksuite/presets / AffineEditorContainer
Class: AffineEditorContainer
Extends
ShadowlessElement
<this
> &DisposableClass
<this
>
Implements
Constructors
new AffineEditorContainer()
new AffineEditorContainer():
AffineEditorContainer
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
readonly
disposables:DisposableGroup
Inherited from
SignalWatcher(WithDisposable(ShadowlessElement)).disposables
Defined in
packages/framework/global/dist/utils/with-disposable.d.ts:6
slots
slots:
EditorSlots
Deprecated
need to refactor
Implementation of
AbstractEditor.slots
Defined in
packages/presets/src/editors/editor-container.ts:120
virtualKeyboardPolicy
virtualKeyboardPolicy:
string
Implementation of
AbstractEditor.virtualKeyboardPolicy
Inherited from
SignalWatcher(WithDisposable(ShadowlessElement)).virtualKeyboardPolicy
Defined in
packages/framework/global/dist/types/virtual-keyboard.d.ts:20
connectedCount
static
connectedCount:WeakMap
<Constructor
,WeakMap
<Node
,number
>>
Inherited from
SignalWatcher(WithDisposable(ShadowlessElement)).connectedCount
Defined in
packages/framework/block-std/dist/view/element/shadowless-element.d.ts:5
onDisconnectedMap
static
onDisconnectedMap:WeakMap
<Constructor
,null
| () =>void
>
Inherited from
SignalWatcher(WithDisposable(ShadowlessElement)).onDisconnectedMap
Defined in
packages/framework/block-std/dist/view/element/shadowless-element.d.ts:6
styles
static
styles:CSSResult
Overrides
SignalWatcher(WithDisposable(ShadowlessElement)).styles
Defined in
packages/presets/src/editors/editor-container.ts:26
autofocus
Implementation of
AbstractEditor.autofocus
Overrides
SignalWatcher(WithDisposable(ShadowlessElement)).autofocus
Defined in
packages/presets/src/editors/editor-container.ts:244
doc
Get Signature
get doc():
Doc
Returns
Set Signature
set doc(
doc
):void
Parameters
doc
Returns
void
Implementation of
AbstractEditor.doc
Defined in
packages/presets/src/editors/editor-container.ts:124
edgelessSpecs
Get Signature
get edgelessSpecs():
ExtensionType
[]
Returns
Set Signature
set edgelessSpecs(
specs
):void
Parameters
specs
Returns
void
Defined in
packages/presets/src/editors/editor-container.ts:136
host
Get Signature
get host():
null
|EditorHost
Returns
null
| EditorHost
Defined in
packages/presets/src/editors/editor-container.ts:140
mode
Get Signature
get mode():
DocMode
Returns
Set Signature
set mode(
mode
):void
Parameters
mode
Returns
void
Implementation of
AbstractEditor.mode
Defined in
packages/presets/src/editors/editor-container.ts:148
pageSpecs
Get Signature
get pageSpecs():
ExtensionType
[]
Returns
Set Signature
set pageSpecs(
specs
):void
Parameters
specs
Returns
void
Defined in
packages/presets/src/editors/editor-container.ts:160
rootModel
Get Signature
get rootModel():
BlockModel
<object
,SignaledProps
<object
>>
Returns
BlockModel
<object
, SignaledProps
<object
>>
Defined in
packages/presets/src/editors/editor-container.ts:164
std
Get Signature
get std():
BlockStdScope
Returns
Defined in
packages/presets/src/editors/editor-container.ts:168
connectedCallback()
connectedCallback():
void
Returns
void
Deprecated
need to refactor
Overrides
SignalWatcher(WithDisposable(ShadowlessElement)).connectedCallback
Defined in
packages/presets/src/editors/editor-container.ts:175
switchEditor()
switchEditor(
mode
):void
Parameters
mode
Returns
void
Defined in
packages/presets/src/editors/editor-container.ts:226
updated()
updated(
changedProperties
):void
Parameters
changedProperties
Map
<string
, unknown
>
Returns
void
Deprecated
need to refactor
Overrides
SignalWatcher(WithDisposable(ShadowlessElement)).updated
Defined in
packages/presets/src/editors/editor-container.ts:233
lifecycle
disconnectedCallback()
disconnectedCallback():
void
Invoked when the component is removed from the document's DOM.
This callback is the main signal to the element that it may no longer be used. disconnectedCallback()
should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.
disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}
An element may be re-connected after being disconnected.
Returns
void
Inherited from
SignalWatcher(WithDisposable(ShadowlessElement)).disconnectedCallback
Defined in
packages/framework/block-std/dist/view/element/shadowless-element.d.ts:12
rendering
createRenderRoot()
createRenderRoot():
this
Returns
this
Inherited from
SignalWatcher(WithDisposable(ShadowlessElement)).createRenderRoot
Defined in
packages/framework/block-std/dist/view/element/shadowless-element.d.ts:11
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
SignalWatcher(WithDisposable(ShadowlessElement)).render
Defined in
packages/presets/src/editors/editor-container.ts:195
styles
finalizeStyles()
protected
static
finalizeStyles(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:7
updates
firstUpdated()
firstUpdated():
void
Invoked when the element is first updated. Implement to perform one time work on the element after update.
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
SignalWatcher(WithDisposable(ShadowlessElement)).firstUpdated
Defined in
packages/presets/src/editors/editor-container.ts:183