The API reference is a Work in Progress and will be continuously improved and extended. We'd love to hear your feedback in our documentation repository.

Home > @edtr-io/store

store package

Functions

FunctionDescription
createStore(options)Creates the Edtr.io store
findNextNode(root, from)Finds the next node in a focus tree in focus order
findParent(root, id)Finds the parent node of an id in the focus tree
findPreviousNode(root, from)Finds the previous node in a focus tree in focus order
getScope(state, scope)Gets the state of a scope
isDocumentEmpty(doc, plugin)Checks whether the given document is empty

Interfaces

InterfaceDescription
ActionCreatorWithoutPayload
ActionCreatorWithPayload
CopyAction
DocumentState
Node_2
ScopedState
StoreOptions

Variables

VariableDescription
blur_2
change
copy(BETA)
focus_2
focusNext
focusPrevious
getClipboard(BETA)
getDocument
getDocuments
getFocused[[Selector]] that returns the id of the focused element (if there is any)
getFocusPath[[Selector]] that returns the focus path from the leaf with the given id
getFocusTree[[Selector]] that returns the focus tree from the root document with the given id
getParent
getPendingChanges
getPlugin
getPlugins
getRoot
hasFocusedChild[[Selector]] that checks whether the document with the given id has a focused child. In contrast to [[hasFocusedDescendant]], this only returns true if the focused document is a direct child of the document.
hasFocusedDescendant[[Selector]] that checks whether the document with the given id has a focused descendant. In contrast to [[hasFocusedChild]], this also returns true if the focused document is an indirect child (e.g. a child of a child of a child).
hasPendingChanges
hasRedoActions
hasUndoActions
initRoot
insert
insertChildAfter
insertChildBefore
isEmpty
isFocused[[Selector]] that checks whether the document with the given id is focused
mayInsertChild
mayRemoveChild
persist
redo
remove
removeChild
replace
reset
serializeDocumentSerializes the document with the given id
serializeRootDocument
setPartialState
undo
unwrap
wrap

Type Aliases

Type AliasDescription
Action
ActionCreator
ActionCreatorAction
BlurAction
ChangeAction
ChangeListener
ClipboardAction
DocumentsAction
FocusAction
FocusDocumentAction
FocusNextDocumentAction
FocusPreviousDocumentAction
HistoryAction
InitRootAction
InsertAction
InsertChildAfterAction
InsertChildBeforeAction
PersistAction
PluginAction
RedoAction
RemoveAction
RemoveChildAction
ReplaceAction
ResetAction
RootAction
Selector
SelectorReturnType
SetPartialState
State
Store
StoreEnhancerFactory
UndoAction
UnwrapAction
WrapAction