The Post Editor’s Data Edit

Namespace: core/editor.

Selectors Selectors

canInsertBlockType canInsertBlockType

Related

  • canInsertBlockType in core/block-editor store.

Top ↑

canUserUseUnfilteredHTML canUserUseUnfilteredHTML

Returns whether or not the user has the unfiltered_html capability.

Parameters

  • state Object: Editor state.

Returns

  • boolean: Whether the user can or can’t post unfiltered HTML.

Top ↑

didPostSaveRequestFail didPostSaveRequestFail

Returns true if a previous post save was attempted but failed, or false
otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post save failed.

Top ↑

didPostSaveRequestSucceed didPostSaveRequestSucceed

Returns true if a previous post save was attempted successfully, or false
otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post was saved successfully.

Top ↑

getActivePostLock getActivePostLock

Returns the active post lock.

Parameters

  • state Object: Global application state.

Returns

  • Object: The lock object.

Top ↑

getAdjacentBlockClientId getAdjacentBlockClientId

Related

  • getAdjacentBlockClientId in core/block-editor store.

Top ↑

getAutosaveAttribute getAutosaveAttribute

Deprecated since 5.6. Callers should use the getAutosave( postType, postId, userId ) selector from the ‘@wordpress/core-data’ package and access properties on the returned autosave object using getPostRawValue.

Returns an attribute value of the current autosave revision for a post, or
null if there is no autosave for the post.

Parameters

  • state Object: Global application state.
  • attributeName string: Autosave attribute name.

Returns

  • *: Autosave attribute value.

Top ↑

getBlock getBlock

Related

  • getBlock in core/block-editor store.

Top ↑

getBlockAttributes getBlockAttributes

Related

  • getBlockAttributes in core/block-editor store.

Top ↑

getBlockCount getBlockCount

Related

  • getBlockCount in core/block-editor store.

Top ↑

getBlockHierarchyRootClientId getBlockHierarchyRootClientId

Related

  • getBlockHierarchyRootClientId in core/block-editor store.

Top ↑

getBlockIndex getBlockIndex

Related

  • getBlockIndex in core/block-editor store.

Top ↑

getBlockInsertionPoint getBlockInsertionPoint

Related

  • getBlockInsertionPoint in core/block-editor store.

Top ↑

getBlockListSettings getBlockListSettings

Related

  • getBlockListSettings in core/block-editor store.

Top ↑

getBlockMode getBlockMode

Related

  • getBlockMode in core/block-editor store.

Top ↑

getBlockName getBlockName

Related

  • getBlockName in core/block-editor store.

Top ↑

getBlockOrder getBlockOrder

Related

  • getBlockOrder in core/block-editor store.

Top ↑

getBlockRootClientId getBlockRootClientId

Related

  • getBlockRootClientId in core/block-editor store.

Top ↑

getBlocks getBlocks

Related

  • getBlocks in core/block-editor store.

Top ↑

getBlocksByClientId getBlocksByClientId

Related

  • getBlocksByClientId in core/block-editor store.

Top ↑

getBlockSelectionEnd getBlockSelectionEnd

Related

  • getBlockSelectionEnd in core/block-editor store.

Top ↑

getBlockSelectionStart getBlockSelectionStart

Related

  • getBlockSelectionStart in core/block-editor store.

Top ↑

getClientIdsOfDescendants getClientIdsOfDescendants

Related

  • getClientIdsOfDescendants in core/block-editor store.

Top ↑

getClientIdsWithDescendants getClientIdsWithDescendants

Related

  • getClientIdsWithDescendants in core/block-editor store.

Top ↑

getCurrentPost getCurrentPost

Returns the post currently being edited in its last known saved state, not
including unsaved edits. Returns an object containing relevant default post
values if the post has not yet been saved.

Parameters

  • state Object: Global application state.

Returns

  • Object: Post object.

Top ↑

getCurrentPostAttribute getCurrentPostAttribute

Returns an attribute value of the saved post.

Parameters

  • state Object: Global application state.
  • attributeName string: Post attribute name.

Returns

  • *: Post attribute value.

Top ↑

getCurrentPostId getCurrentPostId

Returns the ID of the post currently being edited, or null if the post has
not yet been saved.

Parameters

  • state Object: Global application state.

Returns

  • ?number: ID of current post.

Top ↑

getCurrentPostLastRevisionId getCurrentPostLastRevisionId

Returns the last revision ID of the post currently being edited,
or null if the post has no revisions.

Parameters

  • state Object: Global application state.

Returns

  • ?number: ID of the last revision.

Top ↑

getCurrentPostRevisionsCount getCurrentPostRevisionsCount

Returns the number of revisions of the post currently being edited.

Parameters

  • state Object: Global application state.

Returns

  • number: Number of revisions.

Top ↑

getCurrentPostType getCurrentPostType

Returns the post type of the post currently being edited.

Parameters

  • state Object: Global application state.

Returns

  • string: Post type.

Top ↑

getEditedPostAttribute getEditedPostAttribute

Returns a single attribute of the post being edited, preferring the unsaved
edit if one exists, but falling back to the attribute for the last known
saved state of the post.

Parameters

  • state Object: Global application state.
  • attributeName string: Post attribute name.

Returns

  • *: Post attribute value.

Top ↑

getEditedPostContent getEditedPostContent

Returns the content of the post being edited.

Parameters

  • state Object: Global application state.

Returns

  • string: Post content.

Top ↑

Returns the post preview link

Parameters

  • state Object: Global application state.

Returns

  • string?: Preview Link.

Top ↑

getEditedPostSlug getEditedPostSlug

Returns the slug for the post being edited, preferring a manually edited
value if one exists, then a sanitized version of the current post title, and
finally the post ID.

Parameters

  • state Object: Editor state.

Returns

  • string: The current slug to be displayed in the editor

Top ↑

getEditedPostVisibility getEditedPostVisibility

Returns the current visibility of the post being edited, preferring the
unsaved value if different than the saved post. The return value is one of
“private”, “password”, or “public”.

Parameters

  • state Object: Global application state.

Returns

  • string: Post visibility.

Top ↑

getEditorBlocks getEditorBlocks

Return the current block list.

Parameters

  • state Object:

Returns

  • Array: Block list.

Top ↑

getEditorSelection getEditorSelection

Returns the current selection.

Parameters

  • state Object:

Returns

  • WPBlockSelection: The selection end.

Top ↑

getEditorSelectionEnd getEditorSelectionEnd

Deprecated since Gutenberg 10.0.0.

Returns the current selection end.

Parameters

  • state Object:

Returns

  • WPBlockSelection: The selection end.

Top ↑

getEditorSelectionStart getEditorSelectionStart

Deprecated since Gutenberg 10.0.0.

Returns the current selection start.

Parameters

  • state Object:

Returns

  • WPBlockSelection: The selection start.

Top ↑

getEditorSettings getEditorSettings

Returns the post editor settings.

Parameters

  • state Object: Editor state.

Returns

  • Object: The editor settings object.

Top ↑

getFirstMultiSelectedBlockClientId getFirstMultiSelectedBlockClientId

Related

  • getFirstMultiSelectedBlockClientId in core/block-editor store.

Top ↑

getGlobalBlockCount getGlobalBlockCount

Related

  • getGlobalBlockCount in core/block-editor store.

Top ↑

getInserterItems getInserterItems

Related

  • getInserterItems in core/block-editor store.

Top ↑

getLastMultiSelectedBlockClientId getLastMultiSelectedBlockClientId

Related

  • getLastMultiSelectedBlockClientId in core/block-editor store.

Top ↑

getMultiSelectedBlockClientIds getMultiSelectedBlockClientIds

Related

  • getMultiSelectedBlockClientIds in core/block-editor store.

Top ↑

getMultiSelectedBlocks getMultiSelectedBlocks

Related

  • getMultiSelectedBlocks in core/block-editor store.

Top ↑

getMultiSelectedBlocksEndClientId getMultiSelectedBlocksEndClientId

Related

  • getMultiSelectedBlocksEndClientId in core/block-editor store.

Top ↑

getMultiSelectedBlocksStartClientId getMultiSelectedBlocksStartClientId

Related

  • getMultiSelectedBlocksStartClientId in core/block-editor store.

Top ↑

getNextBlockClientId getNextBlockClientId

Related

  • getNextBlockClientId in core/block-editor store.

Top ↑

Returns the permalink for the post.

Parameters

  • state Object: Editor state.

Returns

  • ?string: The permalink, or null if the post is not viewable.

Top ↑

getPermalinkParts getPermalinkParts

Returns the permalink for a post, split into it’s three parts: the prefix,
the postName, and the suffix.

Parameters

  • state Object: Editor state.

Returns

  • Object: An object containing the prefix, postName, and suffix for the permalink, or null if the post is not viewable.

Top ↑

getPostEdits getPostEdits

Returns any post values which have been changed in the editor but not yet
been saved.

Parameters

  • state Object: Global application state.

Returns

  • Object: Object of key value pairs comprising unsaved edits.

Top ↑

getPostLockUser getPostLockUser

Returns details about the post lock user.

Parameters

  • state Object: Global application state.

Returns

  • Object: A user object.

Top ↑

getPostTypeLabel getPostTypeLabel

Returns a post type label depending on the current post.

Parameters

  • state Object: Global application state.

Returns

  • string|undefined: The post type label if available, otherwise undefined.

Top ↑

getPreviousBlockClientId getPreviousBlockClientId

Related

  • getPreviousBlockClientId in core/block-editor store.

Top ↑

getReferenceByDistinctEdits getReferenceByDistinctEdits

Deprecated since Gutenberg 6.5.0.

Returns a new reference when edited values have changed. This is useful in
inferring where an edit has been made between states by comparison of the
return values using strict equality.

Usage

const hasEditOccurred = (
   getReferenceByDistinctEdits( beforeState ) !==
   getReferenceByDistinctEdits( afterState )
);

Parameters

  • state Object: Editor state.

Returns

  • *: A value whose reference will change only when an edit occurs.

Top ↑

getSelectedBlock getSelectedBlock

Related

  • getSelectedBlock in core/block-editor store.

Top ↑

getSelectedBlockClientId getSelectedBlockClientId

Related

  • getSelectedBlockClientId in core/block-editor store.

Top ↑

getSelectedBlockCount getSelectedBlockCount

Related

  • getSelectedBlockCount in core/block-editor store.

Top ↑

getSelectedBlocksInitialCaretPosition getSelectedBlocksInitialCaretPosition

Related

  • getSelectedBlocksInitialCaretPosition in core/block-editor store.

Top ↑

getStateBeforeOptimisticTransaction getStateBeforeOptimisticTransaction

Deprecated since Gutenberg 9.7.0.

Returns state object prior to a specified optimist transaction ID, or null
if the transaction corresponding to the given ID cannot be found.

Top ↑

getSuggestedPostFormat getSuggestedPostFormat

Returns a suggested post format for the current post, inferred only if there
is a single block within the post and it is of a type known to match a
default post format. Returns null if the format cannot be determined.

Parameters

  • state Object: Global application state.

Returns

  • ?string: Suggested post format.

Top ↑

getTemplate getTemplate

Related

  • getTemplate in core/block-editor store.

Top ↑

getTemplateLock getTemplateLock

Related

  • getTemplateLock in core/block-editor store.

Top ↑

hasChangedContent hasChangedContent

Returns true if content includes unsaved changes, or false otherwise.

Parameters

  • state Object: Editor state.

Returns

  • boolean: Whether content includes unsaved changes.

Top ↑

hasEditorRedo hasEditorRedo

Returns true if any future editor history snapshots exist, or false
otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether redo history exists.

Top ↑

hasEditorUndo hasEditorUndo

Returns true if any past editor history snapshots exist, or false otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether undo history exists.

Top ↑

hasInserterItems hasInserterItems

Related

  • hasInserterItems in core/block-editor store.

Top ↑

hasMultiSelection hasMultiSelection

Related

  • hasMultiSelection in core/block-editor store.

Top ↑

hasNonPostEntityChanges hasNonPostEntityChanges

Returns true if there are unsaved edits for entities other than
the editor’s post, and false otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether there are edits or not.

Top ↑

hasSelectedBlock hasSelectedBlock

Related

  • hasSelectedBlock in core/block-editor store.

Top ↑

hasSelectedInnerBlock hasSelectedInnerBlock

Related

  • hasSelectedInnerBlock in core/block-editor store.

Top ↑

inSomeHistory inSomeHistory

Deprecated since Gutenberg 9.7.0.

Returns true if an optimistic transaction is pending commit, for which the
before state satisfies the given predicate function.

Top ↑

isAncestorMultiSelected isAncestorMultiSelected

Related

  • isAncestorMultiSelected in core/block-editor store.

Top ↑

isAutosavingPost isAutosavingPost

Returns true if the post is autosaving, or false otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post is autosaving.

Top ↑

isBlockInsertionPointVisible isBlockInsertionPointVisible

Related

  • isBlockInsertionPointVisible in core/block-editor store.

Top ↑

isBlockMultiSelected isBlockMultiSelected

Related

  • isBlockMultiSelected in core/block-editor store.

Top ↑

isBlockSelected isBlockSelected

Related

  • isBlockSelected in core/block-editor store.

Top ↑

isBlockValid isBlockValid

Related

  • isBlockValid in core/block-editor store.

Top ↑

isBlockWithinSelection isBlockWithinSelection

Related

  • isBlockWithinSelection in core/block-editor store.

Top ↑

isCaretWithinFormattedText isCaretWithinFormattedText

Related

  • isCaretWithinFormattedText in core/block-editor store.

Top ↑

isCleanNewPost isCleanNewPost

Returns true if there are no unsaved values for the current edit session and
if the currently edited post is new (has never been saved before).

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether new post and unsaved values exist.

Top ↑

isCurrentPostPending isCurrentPostPending

Returns true if post is pending review.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether current post is pending review.

Top ↑

isCurrentPostPublished isCurrentPostPublished

Return true if the current post has already been published.

Parameters

  • state Object: Global application state.
  • currentPost Object?: Explicit current post for bypassing registry selector.

Returns

  • boolean: Whether the post has been published.

Top ↑

isCurrentPostScheduled isCurrentPostScheduled

Returns true if post is already scheduled.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether current post is scheduled to be posted.

Top ↑

isEditedPostAutosaveable isEditedPostAutosaveable

Returns true if the post can be autosaved, or false otherwise.

Parameters

  • state Object: Global application state.
  • autosave Object: A raw autosave object from the REST API.

Returns

  • boolean: Whether the post can be autosaved.

Top ↑

isEditedPostBeingScheduled isEditedPostBeingScheduled

Return true if the post being edited is being scheduled. Preferring the
unsaved status values.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post has been published.

Top ↑

isEditedPostDateFloating isEditedPostDateFloating

Returns whether the current post should be considered to have a “floating”
date (i.e. that it would publish “Immediately” rather than at a set time).

Unlike in the PHP backend, the REST API returns a full date string for posts
where the 0000-00-00T00:00:00 placeholder is present in the database. To
infer that a post is set to publish “Immediately” we check whether the date
and modified date are the same.

Parameters

  • state Object: Editor state.

Returns

  • boolean: Whether the edited post has a floating date value.

Top ↑

isEditedPostDirty isEditedPostDirty

Returns true if there are unsaved values for the current edit session, or
false if the editing state matches the saved or new post.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether unsaved values exist.

Top ↑

isEditedPostEmpty isEditedPostEmpty

Returns true if the edited post has content. A post has content if it has at
least one saveable block or otherwise has a non-empty content property
assigned.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether post has content.

Top ↑

isEditedPostNew isEditedPostNew

Returns true if the currently edited post is yet to be saved, or false if
the post has been saved.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post is new.

Top ↑

isEditedPostPublishable isEditedPostPublishable

Return true if the post being edited can be published.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post can been published.

Top ↑

isEditedPostSaveable isEditedPostSaveable

Returns true if the post can be saved, or false otherwise. A post must
contain a title, an excerpt, or non-empty content to be valid for save.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post can be saved.

Top ↑

isFirstMultiSelectedBlock isFirstMultiSelectedBlock

Related

  • isFirstMultiSelectedBlock in core/block-editor store.

Top ↑

isMultiSelecting isMultiSelecting

Related

  • isMultiSelecting in core/block-editor store.

Top ↑

isPermalinkEditable isPermalinkEditable

Returns whether the permalink is editable or not.

Parameters

  • state Object: Editor state.

Returns

  • boolean: Whether or not the permalink is editable.

Top ↑

isPostAutosavingLocked isPostAutosavingLocked

Returns whether post autosaving is locked.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Is locked.

Top ↑

isPostLocked isPostLocked

Returns whether the post is locked.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Is locked.

Top ↑

isPostLockTakeover isPostLockTakeover

Returns whether the edition of the post has been taken over.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Is post lock takeover.

Top ↑

isPostSavingLocked isPostSavingLocked

Returns whether post saving is locked.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Is locked.

Top ↑

isPreviewingPost isPreviewingPost

Returns true if the post is being previewed, or false otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the post is being previewed.

Top ↑

isPublishingPost isPublishingPost

Returns true if the post is being published, or false otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether post is being published.

Top ↑

isPublishSidebarEnabled isPublishSidebarEnabled

Returns whether the pre-publish panel should be shown
or skipped when the user clicks the “publish” button.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether the pre-publish panel should be shown or not.

Top ↑

isSavingNonPostEntityChanges isSavingNonPostEntityChanges

Returns true if non-post entities are currently being saved, or false otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether non-post entities are being saved.

Top ↑

isSavingPost isSavingPost

Returns true if the post is currently being saved, or false otherwise.

Parameters

  • state Object: Global application state.

Returns

  • boolean: Whether post is being saved.

Top ↑

isSelectionEnabled isSelectionEnabled

Related

  • isSelectionEnabled in core/block-editor store.

Top ↑

isTyping isTyping

Related

  • isTyping in core/block-editor store.

Top ↑

isValidTemplate isValidTemplate

Related

  • isValidTemplate in core/block-editor store.

Top ↑

Actions Actions

Top ↑

autosave autosave

Action generator used in signalling that the post should autosave. This
includes server-side autosaving (default) and client-side (a.k.a. local)
autosaving (e.g. on the Web, the post might be committed to Session
Storage).

Parameters

  • options Object?: Extra flags to identify the autosave.

Top ↑

clearSelectedBlock clearSelectedBlock

Related

  • clearSelectedBlock in core/block-editor store.

Top ↑

createUndoLevel createUndoLevel

Returns an action object used in signalling that undo history record should
be created.

Returns

  • Object: Action object.

Top ↑

disablePublishSidebar disablePublishSidebar

Returns an action object used in signalling that the user has disabled the
publish sidebar.

Returns

  • Object: Action object

Top ↑

editPost editPost

Returns an action object used in signalling that attributes of the post have
been edited.

Parameters

  • edits Object: Post attributes to edit.
  • options Object: Options for the edit.

Top ↑

enablePublishSidebar enablePublishSidebar

Returns an action object used in signalling that the user has enabled the
publish sidebar.

Returns

  • Object: Action object

Top ↑

enterFormattedText enterFormattedText

Related

  • enterFormattedText in core/block-editor store.

Top ↑

exitFormattedText exitFormattedText

Related

  • exitFormattedText in core/block-editor store.

Top ↑

hideInsertionPoint hideInsertionPoint

Related

  • hideInsertionPoint in core/block-editor store.

Top ↑

insertBlock insertBlock

Related

  • insertBlock in core/block-editor store.

Top ↑

insertBlocks insertBlocks

Related

  • insertBlocks in core/block-editor store.

Top ↑

insertDefaultBlock insertDefaultBlock

Related

  • insertDefaultBlock in core/block-editor store.

Top ↑

lockPostAutosaving lockPostAutosaving

Returns an action object used to signal that post autosaving is locked.

Usage

// Lock post autosaving with the lock key `mylock`:
wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );

Parameters

  • lockName string: The lock name.

Returns

  • Object: Action object

Top ↑

lockPostSaving lockPostSaving

Returns an action object used to signal that post saving is locked.

Usage

const { subscribe } = wp.data;

const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );

// Only allow publishing posts that are set to a future date.
if ( 'publish' !== initialPostStatus ) {

    // Track locking.
    let locked = false;

    // Watch for the publish event.
    let unssubscribe = subscribe( () => {
        const currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );
        if ( 'publish' !== currentPostStatus ) {

            // Compare the post date to the current date, lock the post if the date isn't in the future.
            const postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );
            const currentDate = new Date();
            if ( postDate.getTime() <= currentDate.getTime() ) {
                if ( ! locked ) {
                    locked = true;
                    wp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );
                }
            } else {
                if ( locked ) {
                    locked = false;
                    wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );
                }
            }
        }
    } );
}

Parameters

  • lockName string: The lock name.

Returns

  • Object: Action object

Top ↑

mergeBlocks mergeBlocks

Related

  • mergeBlocks in core/block-editor store.

Top ↑

moveBlocksDown moveBlocksDown

Related

  • moveBlocksDown in core/block-editor store.

Top ↑

moveBlocksUp moveBlocksUp

Related

  • moveBlocksUp in core/block-editor store.

Top ↑

moveBlockToPosition moveBlockToPosition

Related

  • moveBlockToPosition in core/block-editor store.

Top ↑

multiSelect multiSelect

Related

  • multiSelect in core/block-editor store.

Top ↑

receiveBlocks receiveBlocks

Related

  • receiveBlocks in core/block-editor store.

Top ↑

redo redo

Returns an action object used in signalling that undo history should
restore last popped state.

Top ↑

refreshPost refreshPost

Action generator for handling refreshing the current post.

Top ↑

removeBlock removeBlock

Related

  • removeBlock in core/block-editor store.

Top ↑

removeBlocks removeBlocks

Related

  • removeBlocks in core/block-editor store.

Top ↑

replaceBlock replaceBlock

Related

  • replaceBlock in core/block-editor store.

Top ↑

replaceBlocks replaceBlocks

Related

  • replaceBlocks in core/block-editor store.

Top ↑

resetBlocks resetBlocks

Related

  • resetBlocks in core/block-editor store.

Top ↑

resetEditorBlocks resetEditorBlocks

Returns an action object used to signal that the blocks have been updated.

Parameters

  • blocks Array: Block Array.
  • options ?Object: Optional options.

Top ↑

resetPost resetPost

Returns an action object used in signalling that the latest version of the
post has been received, either by initialization or save.

Parameters

  • post Object: Post object.

Returns

  • Object: Action object.

Top ↑

savePost savePost

Action generator for saving the current post in the editor.

Parameters

  • options Object:

Top ↑

selectBlock selectBlock

Related

  • selectBlock in core/block-editor store.

Top ↑

setTemplateValidity setTemplateValidity

Related

  • setTemplateValidity in core/block-editor store.

Top ↑

setupEditor setupEditor

Returns an action generator used in signalling that editor has initialized with
the specified post object and editor settings.

Parameters

  • post Object: Post object.
  • edits Object: Initial edited attributes object.
  • template Array?: Block Template.

Top ↑

setupEditorState setupEditorState

Returns an action object used to setup the editor state when first opening
an editor.

Parameters

  • post Object: Post object.

Returns

  • Object: Action object.

Top ↑

showInsertionPoint showInsertionPoint

Related

  • showInsertionPoint in core/block-editor store.

Top ↑

startMultiSelect startMultiSelect

Related

  • startMultiSelect in core/block-editor store.

Top ↑

startTyping startTyping

Related

  • startTyping in core/block-editor store.

Top ↑

stopMultiSelect stopMultiSelect

Related

  • stopMultiSelect in core/block-editor store.

Top ↑

stopTyping stopTyping

Related

  • stopTyping in core/block-editor store.

Top ↑

synchronizeTemplate synchronizeTemplate

Related

  • synchronizeTemplate in core/block-editor store.

Top ↑

toggleBlockMode toggleBlockMode

Related

  • toggleBlockMode in core/block-editor store.

Top ↑

toggleSelection toggleSelection

Related

  • toggleSelection in core/block-editor store.

Top ↑

trashPost trashPost

Action generator for trashing the current post in the editor.

Top ↑

undo undo

Returns an action object used in signalling that undo history should pop.

Top ↑

unlockPostAutosaving unlockPostAutosaving

Returns an action object used to signal that post autosaving is unlocked.

Usage

// Unlock post saving with the lock key `mylock`:
wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );

Parameters

  • lockName string: The lock name.

Returns

  • Object: Action object

Top ↑

unlockPostSaving unlockPostSaving

Returns an action object used to signal that post saving is unlocked.

Usage

// Unlock post saving with the lock key `mylock`:
wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );

Parameters

  • lockName string: The lock name.

Returns

  • Object: Action object

Top ↑

updateBlock updateBlock

Related

  • updateBlock in core/block-editor store.

Top ↑

updateBlockAttributes updateBlockAttributes

Related

  • updateBlockAttributes in core/block-editor store.

Top ↑

updateBlockListSettings updateBlockListSettings

Related

  • updateBlockListSettings in core/block-editor store.

Top ↑

updateEditorSettings updateEditorSettings

Undocumented declaration.

Top ↑

updatePost updatePost

Deprecated since Gutenberg 9.7.0.

Returns an action object used in signalling that a patch of updates for the
latest version of the post have been received.

Returns

  • Object: Action object.

Top ↑

updatePostLock updatePostLock

Returns an action object used to lock the editor.

Parameters

  • lock Object: Details about the post lock status, user, and nonce.

Returns

  • Object: Action object.