stores
Documentation / editor/stores
EditorStores​
Defined in: editor/stores.ts:22
Properties​
Property | Type | Defined in |
---|---|---|
editor/stores.ts:23 | ||
editor/stores.ts:24 | ||
| editor/stores.ts:27 | |
| editor/stores.ts:26 | |
editor/stores.ts:25 |
Methods​
updateEditor()​
updateEditor(editor: Editor): void;
Defined in: editor/stores.ts:28
Parameters​
Parameter | Type |
---|---|
|
Returns​
void
Readable<T>​
Defined in: editor/stores.ts:6
Type Parameters​
Type Parameter |
---|
|
Methods​
get()​
get(): T;
Defined in: editor/stores.ts:10
Return the current value.
Returns​
T
subscribe()​
subscribe(callback: Subscriber<T>): Unsubscriber;
Defined in: editor/stores.ts:15
Subscribe to changes with a callback. Returns an unsubscribe function.
Parameters​
Parameter | Type |
---|---|
|
|
Returns​
Subscriber()<T>​
type Subscriber<T> = (value: T) => void;
Defined in: editor/stores.ts:21
Callback to inform of a value updates.
Type Parameters​
Type Parameter |
---|
|
Parameters​
Parameter | Type |
---|---|
|
|
Returns​
void
Unsubscriber()​
type Unsubscriber = () => void;
Defined in: editor/stores.ts:18
Unsubscribes from value updates.
Returns​
void
activeStore()​
function activeStore(editorStore: Readable<Editor>): Readable<AttributeMap>;
Defined in: editor/stores.ts:96
Parameters​
Parameter | Type |
---|---|
|
Returns​
derivedEditorStore()​
function derivedEditorStore<T>(
editorStore: Readable<Editor>,
defaultValue: T,
changeEvents: string[],
update: (editor: Editor) => T,
checkEquality?: boolean): Readable<T>;
Defined in: editor/stores.ts:54
Type Parameters​
Type Parameter |
---|
|
Parameters​
Parameter | Type |
---|---|
| |
|
|
|
|
| ( |
|
|
Returns​
Readable
<T
>
docStore()​
function docStore(editorStore: Readable<Editor>): Readable<default>;
Defined in: editor/stores.ts:100
Parameters​
Parameter | Type |
---|---|
|
Returns​
editorStores()​
function editorStores(editor: Editor): EditorStores;
Defined in: editor/stores.ts:31
Parameters​
Parameter | Type |
---|---|
|
Returns​
focusStore()​
function focusStore(editorStore: Readable<Editor>): Readable<boolean>;
Defined in: editor/stores.ts:108
Parameters​
Parameter | Type |
---|---|
|
Returns​
Readable
<boolean
>
rootStore()​
function rootStore(editorStore: Readable<Editor>): Readable<HTMLElement>;
Defined in: editor/stores.ts:112
Parameters​
Parameter | Type |
---|---|
|
Returns​
Readable
<HTMLElement
>
selectionStore()​
function selectionStore(editorStore: Readable<Editor>): Readable<EditorRange>;
Defined in: editor/stores.ts:104
Parameters​
Parameter | Type |
---|---|
|