[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> editor.js (summary)

(no description)

File Size: 16935 lines (568 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 classes

AutosaveMonitor:: (20 methods):
  DocumentBar()
  BaseDocumentActions()
  EmptyOutlineIllustration()
  DocumentOutlineCheck()
  EditorKeyboardShortcutsRegister()
  EditorHistoryRedo()
  EditorHistoryUndo()
  TemplateValidationNotice()
  EditorNotices()
  EditorSnackbars()
  EntityRecordItem()
  getEntityDescription()
  GlobalStylesDescription()
  EntityDescription()
  EntityTypeList()
  identity()
  EntitiesSavedStates()
  EntitiesSavedStatesExtensible()
  getContent()
  CopyButton()

ErrorBoundary:: (58 methods):
  useAutosaveNotice()
  useAutosavePurge()
  LocalAutosaveMonitor()
  PageAttributesCheck()
  PostTypeSupportCheck()
  PageAttributesOrder()
  PageAttributesOrderWithChecks()
  buildTermsTree()
  getTitle()
  PageAttributesParent()
  PageAttributesPanel()
  CreateNewTemplateModal()
  useEditedPostContext()
  useAllowSwitchingTemplates()
  useTemplates()
  useAvailableTemplates()
  useCurrentTemplateSlug()
  PostTemplateToggle()
  PostTemplateDropdownContent()
  ClassicThemeControl()
  SwapTemplateButton()
  TemplatesList()
  ResetDefaultTemplate()
  CreateNewTemplate()
  BlockThemeControl()
  PostTemplatePanel()
  useAuthorsQuery()
  PostAuthorCombobox()
  PostAuthorSelect()
  PostAuthor()
  PostAuthorCheck()
  panel_PostAuthor()
  PostComments()
  PostPingbacks()
  PostDiscussionPanel()
  PostExcerpt()
  PostExcerptCheck()
  PostExcerptPanel()
  ThemeSupportCheck()
  PostFeaturedImageCheck()
  getMediaDetails()
  PostFeaturedImage()
  onDropFiles()
  FeaturedImage()
  PostFormatCheck()
  PostFormat()
  PostLastRevisionCheck()
  LastRevision()
  PostLastRevisionPanel()
  PostLockedModal()
  sendPostLock()
  receivePostLock()
  releasePostLock()
  PostPendingStatusCheck()
  PostPendingStatus()
  writeInterstitialMessage()
  PostPreviewButton()
  PublishButtonLabel()

PostPublishButton:: (50 methods):
  PostVisibility()
  PostVisibilityChoice()
  PostVisibilityLabel()
  usePostVisibilityLabel()
  requiredArgs()
  _typeof()
  toDate()
  startOfMonth()
  endOfMonth()
  toInteger()
  parseISO()
  splitDateString()
  parseYear()
  parseDate()
  parseDateUnit()
  parseTime()
  parseTimeUnit()
  parseTimezone()
  dayOfISOWeekYear()
  isLeapYearIndex()
  validateDate()
  validateDayOfYearDate()
  validateWeekDate()
  validateTime()
  validateTimezone()
  PostSchedule()
  PostScheduleLabel()
  usePostScheduleLabel()
  getFullPostScheduleLabel()
  getPostScheduleLabel()
  getTimezoneAbbreviation()
  isTimezoneSameAsSiteTimezone()
  isSameDay()
  MostUsedTerms()
  FlatTermSelector()
  onUpdateTerms()
  onChange()
  appendTerm()
  PostFormatPanel()
  sortBySelected()
  findTerm()
  getFilterMatcher()
  HierarchicalTermSelector()
  MaybeCategoryPanel()
  flattenBlocks()
  Image()
  maybe_upload_media_PostFormatPanel()
  uploadImages()
  PostPublishPanelPrepublish()
  postpublish_CopyButton()

PostPublishPanelPostpublish:: (0 methods):

PostPublishPanel:: (5 methods):
  Icon()
  PostSavedState()
  PostScheduleCheck()
  PostSchedulePanel()
  PostSlugCheck()

PostSlug:: (64 methods):
  PostStickyCheck()
  PostSticky()
  PostSwitchToDraftButton()
  PostSyncStatus()
  PostTaxonomies()
  PostTaxonomiesCheck()
  TaxonomyPanel()
  panel_PostTaxonomies()
  PostTextEditor()
  usePostTitleFocus()
  usePostTitle()
  updateTitle()
  PostTitle()
  onChange()
  onInsertBlockAfter()
  onSelect()
  onUnselect()
  onEnterPress()
  onKeyDown()
  onPaste()
  PostTitleRaw()
  onChange()
  onSelect()
  onUnselect()
  PostTrash()
  PostTrashCheck()
  PostURL()
  PostURLCheck()
  PostURLLabel()
  usePostURLLabel()
  PostURLPanel()
  PostURLToggle()
  PostVisibilityCheck()
  WordCount()
  TimeToRead()
  CharacterCount()
  TableOfContentsPanel()
  TableOfContents()
  UnsavedChangesWarning()
  mediaUpload()
  useBlockEditorSettings()
  useDisableNonPageContentBlocks()
  DisableNonPageContentBlocks()
  NavigationBlockEditingMode()
  useBlockEditorProps()
  EditorProvider()
  deprecateComponent()
  deprecateFunction()
  cleanForSlug()
  EditTemplateBlocksNotification()
  getPostContentAttributes()
  checkForPostContentAtRootLevel()
  EditorCanvas()
  DocumentTools()
  InserterSidebar()
  ListViewOutline()
  ListViewSidebar()
  handleSidebarFocus()
  PostViewLink()
  PreviewDropdown()
  BlockTypesChecklist()
  BlockManagerCategory()
  BlockManager()
  EditorPreferencesModal()

Defines 64 functions

  assign()
  init()
  changeOverflow()
  getParentOverflows()
  resize()
  update()
  destroy()
  update()
  classNames()
  lineHeight()
  emptyFunction()
  emptyFunctionWithReset()
  shim()
  getShim()
  __()
  TextareaAutosizeClass()
  matcher()
  __webpack_require__()
  getPostRawValue()
  hasSameKeys()
  isUpdatingSamePostProperty()
  shouldOverwriteState()
  postId()
  templateId()
  postType()
  template()
  saving()
  deleting()
  postLock()
  postSavingLock()
  postAutosavingLock()
  editorSettings()
  renderingMode()
  deviceType()
  removedPanels()
  blockInserterPanel()
  listViewPanel()
  listViewToggleRef()
  arrayOf()
  isObjectLike()
  createCache()
  isShallowEqual()
  rememo()
  getCache()
  clear()
  callSelector()
  getTemplatePartIcon()
  isEditedPostNew()
  hasChangedContent()
  isCleanNewPost()
  getCurrentPostType()
  getCurrentPostId()
  getCurrentTemplateId()
  getCurrentPostRevisionsCount()
  getCurrentPostLastRevisionId()
  getCurrentPostAttribute()
  getEditedPostAttribute()
  getEditedPostVisibility()
  isCurrentPostPending()
  isCurrentPostPublished()
  isCurrentPostScheduled()
  isEditedPostPublishable()
  isEditedPostSaveable()
  isEditedPostBeingScheduled()
  isEditedPostDateFloating()
  isDeletingPost()
  isSavingPost()
  isAutosavingPost()
  isPreviewingPost()
  getEditedPostPreviewLink()
  isPublishingPost()
  isPermalinkEditable()
  getPermalink()
  getEditedPostSlug()
  getPermalinkParts()
  isPostLocked()
  isPostSavingLocked()
  isPostAutosavingLocked()
  isPostLockTakeover()
  getPostLockUser()
  getActivePostLock()
  canUserUseUnfilteredHTML()
  isEditorPanelRemoved()
  getEditorSelectionStart()
  getEditorSelectionEnd()
  getEditorSelection()
  __unstableIsEditorReady()
  getEditorSettings()
  getRenderingMode()
  getDeviceType()
  isListViewOpened()
  isInserterOpened()
  getStateBeforeOptimisticTransaction()
  inSomeHistory()
  getBlockEditorSelector()
  __experimentalGetDefaultTemplateTypes()
  __experimentalGetTemplateInfo()
  postKey()
  localAutosaveGet()
  localAutosaveSet()
  localAutosaveClear()
  getNotificationArgumentsForSaveSuccess()
  getNotificationArgumentsForSaveFail()
  getNotificationArgumentsForTrashFail()
  __experimentalTearDownEditor()
  resetPost()
  updatePost()
  setupEditorState()
  setEditedPost()
  refreshPost()
  createUndoLevel()
  updatePostLock()
  lockPostSaving()
  unlockPostSaving()
  lockPostAutosaving()
  unlockPostAutosaving()
  updateEditorSettings()
  setDeviceType()
  removeEditorPanel()
  setIsInserterOpened()
  setIsListViewOpened()
  setCurrentTemplateId()
  getListViewToggleRef()
  shimAttributeSource()
  getUserLabel()
  setDefaultCompleters()
  BindingUpdater()
  ControlsWithStoreSubscription()
  EditorKeyboardShortcuts()

Class: AutosaveMonitor  - X-Ref

AutosaveMonitor invokes `props.autosave()` within at most `interval` seconds after an unsaved change is detected.

The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.
The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as
the specific way of detecting changes.

There are two caveats:
* If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.
* The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.
DocumentBar()   X-Ref
No description

BaseDocumentActions({postType,postId,onBack})   X-Ref
No description

EmptyOutlineIllustration()   X-Ref
No description

DocumentOutlineCheck({blocks,children})   X-Ref
WordPress dependencies


EditorKeyboardShortcutsRegister()   X-Ref
No description

EditorHistoryRedo(props, ref)   X-Ref
Internal dependencies


EditorHistoryUndo(props, ref)   X-Ref
Internal dependencies


TemplateValidationNotice({isValid,...props})   X-Ref
No description

EditorNotices()   X-Ref
Internal dependencies


EditorSnackbars()   X-Ref
No description

EntityRecordItem({record,checked,onChange})   X-Ref
Internal dependencies


getEntityDescription(entity, count)   X-Ref
No description

GlobalStylesDescription({record})   X-Ref
No description

EntityDescription({record,count})   X-Ref
No description

EntityTypeList({list,unselectedEntities,setUnselectedEntities})   X-Ref
No description

identity(values)   X-Ref
No description

EntitiesSavedStates({close})   X-Ref
No description

EntitiesSavedStatesExtensible({additionalPrompt = undefined,close,onSave = identity,saveEnabled: saveEnabledProp = undefined,saveLabel = (0,external_wp_i18n_namespaceObject.__)   X-Ref
No description

getContent()   X-Ref
Internal dependencies


CopyButton({text,children})   X-Ref
No description

Class: ErrorBoundary  - X-Ref

useAutosaveNotice()   X-Ref
Custom hook which manages the creation of a notice prompting the user to
restore a local autosave, if one exists.


useAutosavePurge()   X-Ref
Custom hook which ejects a local autosave after a successful save occurs.


LocalAutosaveMonitor()   X-Ref
No description

PageAttributesCheck({children})   X-Ref
Internal dependencies


PostTypeSupportCheck({children,supportKeys})   X-Ref
A component which renders its own children only if the current editor post
type supports one of the given `supportKeys` prop.

param: {Object}            props             Props.
param: {Element}           props.children    Children to be rendered if post
param: {(string|string[])} props.supportKeys String or string array of keys
return: {Component} The component to be rendered.

PageAttributesOrder()   X-Ref
Internal dependencies


PageAttributesOrderWithChecks()   X-Ref
No description

buildTermsTree(flatTerms)   X-Ref
Returns terms in a tree form.

param: {Array} flatTerms Array of terms in flat format.
return: {Array} Array of terms in tree format.

getTitle(post)   X-Ref
Internal dependencies


PageAttributesParent()   X-Ref
No description

PageAttributesPanel()   X-Ref
No description

CreateNewTemplateModal({onClose})   X-Ref
No description

useEditedPostContext()   X-Ref
Internal dependencies


useAllowSwitchingTemplates()   X-Ref
No description

useTemplates(postType)   X-Ref
No description

useAvailableTemplates(postType)   X-Ref
No description

useCurrentTemplateSlug()   X-Ref
No description

PostTemplateToggle({isOpen,onClick})   X-Ref
No description

PostTemplateDropdownContent({onClose})   X-Ref
No description

ClassicThemeControl()   X-Ref
No description

SwapTemplateButton({onClick})   X-Ref
Internal dependencies


TemplatesList({postType,onSelect})   X-Ref
No description

ResetDefaultTemplate({onClick})   X-Ref
Internal dependencies


CreateNewTemplate({onClick})   X-Ref
Internal dependencies


BlockThemeControl({id})   X-Ref
No description

PostTemplatePanel()   X-Ref
No description

useAuthorsQuery(search)   X-Ref
Internal dependencies


PostAuthorCombobox()   X-Ref
Internal dependencies


PostAuthorSelect()   X-Ref
Internal dependencies


PostAuthor()   X-Ref
No description

PostAuthorCheck({children})   X-Ref
No description

panel_PostAuthor()   X-Ref
No description

PostComments()   X-Ref
Internal dependencies


PostPingbacks()   X-Ref
Internal dependencies


PostDiscussionPanel()   X-Ref
No description

PostExcerpt()   X-Ref
Internal dependencies


PostExcerptCheck({children})   X-Ref
Internal dependencies


PostExcerptPanel()   X-Ref
Module Constants


ThemeSupportCheck({themeSupports,children,postType,supportKeys})   X-Ref
Internal dependencies


PostFeaturedImageCheck({children})   X-Ref
Internal dependencies


getMediaDetails(media, postId)   X-Ref
No description

PostFeaturedImage({currentPostId,featuredImageId,onUpdateImage,onRemoveImage,media,postType,noticeUI,noticeOperations})   X-Ref
No description

onDropFiles(filesList)   X-Ref
No description

FeaturedImage()   X-Ref
No description

PostFormatCheck({children})   X-Ref
Internal dependencies


PostFormat()   X-Ref
No description

PostLastRevisionCheck({children})   X-Ref
Internal dependencies


LastRevision()   X-Ref
Internal dependencies


PostLastRevisionPanel()   X-Ref
Internal dependencies


PostLockedModal()   X-Ref
Internal dependencies


sendPostLock(data)   X-Ref
Keep the lock refreshed.

When the user does not send a heartbeat in a heartbeat-tick
the user is no longer editing and another user can start editing.

param: {Object} data Data to send in the heartbeat request.

receivePostLock(data)   X-Ref
Refresh post locks: update the lock string or show the dialog if somebody has taken over editing.

param: {Object} data Data received in the heartbeat request

releasePostLock()   X-Ref
Unlock the post before the window is exited.


PostPendingStatusCheck({children})   X-Ref
Internal dependencies


PostPendingStatus()   X-Ref
Internal dependencies


writeInterstitialMessage(targetDocument)   X-Ref
Internal dependencies


PostPreviewButton({className,textContent,forceIsAutosaveable,role,onPreview})   X-Ref
No description

PublishButtonLabel({isPublished,isBeingScheduled,isSaving,isPublishing,hasPublishAction,isAutosaving,hasNonPostEntityChanges})   X-Ref
Internal dependencies


Class: PostPublishButton  - X-Ref

PostVisibility({onClose})   X-Ref
Internal dependencies


PostVisibilityChoice({instanceId,value,label,info,...props})   X-Ref
No description

PostVisibilityLabel()   X-Ref
Internal dependencies


usePostVisibilityLabel()   X-Ref
No description

requiredArgs(required, args)   X-Ref
No description

_typeof(obj)   X-Ref
No description

toDate(argument)   X-Ref

returns: {Date} the parsed date in the local time zone
param: {Date|Number} argument - the value to convert

startOfMonth(dirtyDate)   X-Ref

returns: {Date} the start of a month
param: {Date|Number} date - the original date

endOfMonth(dirtyDate)   X-Ref

returns: {Date} the end of a month
param: {Date|Number} date - the original date

toInteger(dirtyNumber)   X-Ref
No description

parseISO(argument, options)   X-Ref

returns: {Date} the parsed date in the local time zone
param: {String} argument - the value to convert
param: {Object} [options] - an object with options.
param: {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format

splitDateString(dateString)   X-Ref
No description

parseYear(dateString, additionalDigits)   X-Ref
No description

parseDate(dateString, year)   X-Ref
No description

parseDateUnit(value)   X-Ref
No description

parseTime(timeString)   X-Ref
No description

parseTimeUnit(value)   X-Ref
No description

parseTimezone(timezoneString)   X-Ref
No description

dayOfISOWeekYear(isoWeekYear, week, day)   X-Ref
No description

isLeapYearIndex(year)   X-Ref
No description

validateDate(year, month, date)   X-Ref
No description

validateDayOfYearDate(year, dayOfYear)   X-Ref
No description

validateWeekDate(_year, week, day)   X-Ref
No description

validateTime(hours, minutes, seconds)   X-Ref
No description

validateTimezone(_hours, minutes)   X-Ref
No description

PostSchedule({onClose})   X-Ref
Internal dependencies


PostScheduleLabel(props)   X-Ref
Internal dependencies


usePostScheduleLabel({full = false} = {})   X-Ref
No description

getFullPostScheduleLabel(dateAttribute)   X-Ref
No description

getPostScheduleLabel(dateAttribute, {isFloating = false,now = new Date()   X-Ref
No description

getTimezoneAbbreviation()   X-Ref
No description

isTimezoneSameAsSiteTimezone(date)   X-Ref
No description

isSameDay(left, right)   X-Ref
No description

MostUsedTerms({onSelect,taxonomy})   X-Ref
No description

FlatTermSelector({slug})   X-Ref
No description

onUpdateTerms(newTermIds)   X-Ref
No description

onChange(termNames)   X-Ref
No description

appendTerm(newTerm)   X-Ref
No description

PostFormatPanel()   X-Ref
No description

sortBySelected(termsTree, terms)   X-Ref
Sort Terms by Selected.

param: {Object[]} termsTree Array of terms in tree format.
param: {number[]} terms     Selected terms.
return: {Object[]} Sorted array of terms.

findTerm(terms, parent, name)   X-Ref
Find term by parent id or name.

param: {Object[]}      terms  Array of Terms.
param: {number|string} parent id.
param: {string}        name   Term name.
return: {Object} Term object.

getFilterMatcher(filterValue)   X-Ref
Get filter matcher function.

param: {string} filterValue Filter value.
return: {(function(Object): (Object|boolean))} Matcher function.

HierarchicalTermSelector({slug})   X-Ref
Hierarchical term selector.

param: {Object} props      Component props.
param: {string} props.slug Taxonomy slug.
return: {Element}        Hierarchical term selector component.

MaybeCategoryPanel()   X-Ref
Internal dependencies


flattenBlocks(blocks)   X-Ref
Internal dependencies


Image(block)   X-Ref
No description

maybe_upload_media_PostFormatPanel()   X-Ref
No description

uploadImages()   X-Ref
No description

PostPublishPanelPrepublish({children})   X-Ref
No description

postpublish_CopyButton({text,onCopy,children})   X-Ref
No description

Class: PostPublishPanelPostpublish  - X-Ref

Class: PostPublishPanel  - X-Ref

Icon({icon,size = 24,...props}, ref)   X-Ref
Return an SVG icon.

param: {IconProps}                                 props icon is the SVG component to render
param: {import('react').ForwardedRef<HTMLElement>} ref   The forwarded ref to the SVG element.
return: {JSX.Element}  Icon component

PostSavedState({forceIsDirty})   X-Ref
Component showing whether the post is saved or not and providing save
buttons.

param: {Object}   props              Component props.
param: {?boolean} props.forceIsDirty Whether to force the post to be marked
return: {import('react').ComponentType} The component.

PostScheduleCheck({children})   X-Ref
Internal dependencies


PostSchedulePanel()   X-Ref
No description

PostSlugCheck({children})   X-Ref
Internal dependencies


Class: PostSlug  - X-Ref

Internal dependencies

PostStickyCheck({children})   X-Ref
Internal dependencies


PostSticky()   X-Ref
Internal dependencies


PostSwitchToDraftButton()   X-Ref
Internal dependencies


PostSyncStatus()   X-Ref
Internal dependencies


PostTaxonomies({taxonomyWrapper = post_taxonomies_identity})   X-Ref
No description

PostTaxonomiesCheck({children})   X-Ref
Internal dependencies


TaxonomyPanel({taxonomy,children})   X-Ref
No description

panel_PostTaxonomies()   X-Ref
No description

PostTextEditor()   X-Ref
Internal dependencies


usePostTitleFocus(forwardedRef)   X-Ref
Internal dependencies


usePostTitle()   X-Ref
Internal dependencies


updateTitle(newTitle)   X-Ref
No description

PostTitle(_, forwardedRef)   X-Ref
No description

onChange(value)   X-Ref
No description

onInsertBlockAfter(blocks)   X-Ref
No description

onSelect()   X-Ref
No description

onUnselect()   X-Ref
No description

onEnterPress()   X-Ref
No description

onKeyDown(event)   X-Ref
No description

onPaste(event)   X-Ref
No description

PostTitleRaw(_, forwardedRef)   X-Ref
No description

onChange(value)   X-Ref
No description

onSelect()   X-Ref
No description

onUnselect()   X-Ref
No description

PostTrash()   X-Ref
Internal dependencies


PostTrashCheck({isNew,postId,canUserDelete,children})   X-Ref
Internal dependencies


PostURL({onClose})   X-Ref
Internal dependencies


PostURLCheck({children})   X-Ref
Internal dependencies


PostURLLabel()   X-Ref
Internal dependencies


usePostURLLabel()   X-Ref
No description

PostURLPanel()   X-Ref
No description

PostURLToggle({isOpen,onClick})   X-Ref
No description

PostVisibilityCheck({render})   X-Ref
Internal dependencies


WordCount()   X-Ref
Internal dependencies


TimeToRead()   X-Ref
Average reading rate - based on average taken from
https://irisreading.com/average-reading-speed-in-various-languages/
(Characters/minute used for Chinese rather than words).


CharacterCount()   X-Ref
Internal dependencies


TableOfContentsPanel({hasOutlineItemsDisabled,onRequestClose})   X-Ref
No description

TableOfContents({hasOutlineItemsDisabled,repositionDropdown,...props}, ref)   X-Ref
Internal dependencies


UnsavedChangesWarning()   X-Ref
Warns the user if there are unsaved changes before leaving the editor.
Compatible with Post Editor and Site Editor.

return: {Component} The component.

mediaUpload({additionalData = {},allowedTypes,filesList,maxUploadFileSize,onError = media_upload_noop,onFileChange})   X-Ref
Upload a media file when the file upload button is activated.
Wrapper around mediaUpload() that injects the current post ID.

param: {Object}   $0                   Parameters object passed to the function.
param: {?Object}  $0.additionalData    Additional data to include in the request.
param: {string}   $0.allowedTypes      Array with the types of media that can be uploaded, if unset all types are allowed.
param: {Array}    $0.filesList         List of files.
param: {?number}  $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.
param: {Function} $0.onError           Function called when an error happens.
param: {Function} $0.onFileChange      Function called each time a file or a temporary representation of the file is available.

useBlockEditorSettings(settings, postType, postId)   X-Ref
React hook used to compute the block editor settings to use for the post editor.

param: {Object} settings EditorProvider settings prop.
param: {string} postType Editor root level post type.
param: {string} postId   Editor root level post ID.
return: {Object} Block Editor Settings.

useDisableNonPageContentBlocks()   X-Ref
No description

DisableNonPageContentBlocks()   X-Ref
Component that when rendered, makes it so that the site editor allows only
page content to be edited.


NavigationBlockEditingMode()   X-Ref
For the Navigation block editor, we need to force the block editor to contentOnly for that block.

Set block editing mode to contentOnly when entering Navigation focus mode.
this ensures that non-content controls on the block will be hidden and thus
the user can focus on editing the Navigation Menu content only.

useBlockEditorProps(post, template, mode)   X-Ref
Depending on the post, template and template mode,
returns the appropriate blocks and change handlers for the block editor provider.

param: {Array}   post     Block list.
param: {boolean} template Whether the page content has focus (and the surrounding template is inert). If `true` return page content blocks. Default `false`.
param: {string}  mode     Rendering mode.
return: {Array} Block editor props.

EditorProvider(props)   X-Ref
No description

deprecateComponent(name, Wrapped, staticsToHoist = [])   X-Ref
No description

deprecateFunction(name, func)   X-Ref
No description

cleanForSlug(string)   X-Ref
Performs some basic cleanup of a string for use as a post slug

This replicates some of what sanitize_title() does in WordPress core, but
is only designed to approximate what the slug will be.

Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.
Removes combining diacritical marks. Converts whitespace, periods,
and forward slashes to hyphens. Removes any remaining non-word characters
except hyphens and underscores. Converts remaining string to lowercase.
It does not account for octets, HTML entities, or other encoded characters.

param: {string} string Title or slug to be processed
return: {string} Processed string

EditTemplateBlocksNotification({contentRef})   X-Ref
Component that:

- Displays a 'Edit your template to edit this block' notification when the
user is focusing on editing page content and clicks on a disabled template
block.
- Displays a 'Edit your template to edit this block' dialog when the user
is focusing on editing page conetnt and double clicks on a disabled
template block.

param: {Object}                                 props
param: {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block

getPostContentAttributes(blocks)   X-Ref
Given an array of nested blocks, find the first Post Content
block inside it, recursing through any nesting levels,
and return its attributes.

param: {Array} blocks A list of blocks.
return: {Object | undefined} The Post Content block.

checkForPostContentAtRootLevel(blocks)   X-Ref
No description

EditorCanvas({autoFocus,className,renderAppender,styles,disableIframe = false,iframeProps,children})   X-Ref
No description

DocumentTools({className,disableBlockTools = false,children,listViewLabel = (0,external_wp_i18n_namespaceObject.__)   X-Ref
No description

InserterSidebar()   X-Ref
Internal dependencies


ListViewOutline()   X-Ref
No description

ListViewSidebar()   X-Ref
No description

handleSidebarFocus(currentTab)   X-Ref
No description

PostViewLink()   X-Ref
Internal dependencies


PreviewDropdown({forceIsAutosaveable,disabled})   X-Ref
Internal dependencies


BlockTypesChecklist({blockTypes,value,onItemChange})   X-Ref
WordPress dependencies


BlockManagerCategory({title,blockTypes})   X-Ref
No description

BlockManager({blockTypes,categories,hasBlockSupport,isMatchingSearchTerm,numberOfHiddenBlocks,enableAllBlockTypes})   X-Ref
No description

EditorPreferencesModal({extraSections = {},isActive,onClose})   X-Ref
No description

Functions
Functions that are not part of a class:

assign(ta)   X-Ref
No description

init()   X-Ref
No description

changeOverflow(value)   X-Ref
No description

getParentOverflows(el)   X-Ref
No description

resize()   X-Ref
No description

update()   X-Ref
No description

destroy(ta)   X-Ref
No description

update(ta)   X-Ref
No description

classNames()   X-Ref
No description

lineHeight(node)   X-Ref
Calculate the `line-height` of a given node

returns: {Number} `line-height` of the element in pixels
param: {HTMLElement} node Element to calculate line height of. Must be in the DOM.

emptyFunction()   X-Ref
No description

emptyFunctionWithReset()   X-Ref
No description

shim(props, propName, componentName, location, propFullName, secret)   X-Ref
No description

getShim()   X-Ref
No description

__()   X-Ref
No description

TextareaAutosizeClass()   X-Ref
A light replacement for built-in textarea component
which automaticaly adjusts its height to match the content


matcher(match)   X-Ref
No description

__webpack_require__(moduleId)   X-Ref
No description

getPostRawValue(value)   X-Ref
Returns a post attribute value, flattening nested rendered content using its
raw value in place of its original object form.

param: {*} value Original value.
return: {*} Raw value.

hasSameKeys(a, b)   X-Ref
Returns true if the two object arguments have the same keys, or false
otherwise.

param: {Object} a First object.
param: {Object} b Second object.
return: {boolean} Whether the two objects have the same keys.

isUpdatingSamePostProperty(action, previousAction)   X-Ref
Returns true if, given the currently dispatching action and the previously
dispatched action, the two actions are editing the same post property, or
false otherwise.

param: {Object} action         Currently dispatching action.
param: {Object} previousAction Previously dispatched action.
return: {boolean} Whether actions are updating the same post property.

shouldOverwriteState(action, previousAction)   X-Ref
Returns true if, given the currently dispatching action and the previously
dispatched action, the two actions are modifying the same property such that
undo history should be batched.

param: {Object} action         Currently dispatching action.
param: {Object} previousAction Previously dispatched action.
return: {boolean} Whether to overwrite present state.

postId(state = null, action)   X-Ref
No description

templateId(state = null, action)   X-Ref
No description

postType(state = null, action)   X-Ref
No description

template(state = {isValid: true}, action)   X-Ref
Reducer returning whether the post blocks match the defined template or not.

param: {Object} state  Current state.
param: {Object} action Dispatched action.
return: {boolean} Updated state.

saving(state = {}, action)   X-Ref
Reducer returning current network request state (whether a request to
the WP REST API is in progress, successful, or failed).

param: {Object} state  Current state.
param: {Object} action Dispatched action.
return: {Object} Updated state.

deleting(state = {}, action)   X-Ref
Reducer returning deleting post request state.

param: {Object} state  Current state.
param: {Object} action Dispatched action.
return: {Object} Updated state.

postLock(state = {isLocked: false}, action)   X-Ref
Reducer returning the post lock status.

param: {PostLockState} state  Current state.
param: {Object}        action Dispatched action.
return: {PostLockState} Updated state.

postSavingLock(state = {}, action)   X-Ref
Post saving lock.

When post saving is locked, the post cannot be published or updated.

param: {PostLockState} state  Current state.
param: {Object}        action Dispatched action.
return: {PostLockState} Updated state.

postAutosavingLock(state = {}, action)   X-Ref
Post autosaving lock.

When post autosaving is locked, the post will not autosave.

param: {PostLockState} state  Current state.
param: {Object}        action Dispatched action.
return: {PostLockState} Updated state.

editorSettings(state = EDITOR_SETTINGS_DEFAULTS, action)   X-Ref
Reducer returning the post editor setting.

param: {Object} state  Current state.
param: {Object} action Dispatched action.
return: {Object} Updated state.

renderingMode(state = 'post-only', action)   X-Ref
No description

deviceType(state = 'Desktop', action)   X-Ref
Reducer returning the editing canvas device type.

param: {Object} state  Current state.
param: {Object} action Dispatched action.
return: {Object} Updated state.

removedPanels(state = [], action)   X-Ref
Reducer storing the list of all programmatically removed panels.

param: {Array}  state  Current state.
param: {Object} action Action object.
return: {Array} Updated state.

blockInserterPanel(state = false, action)   X-Ref
Reducer to set the block inserter panel open or closed.

Note: this reducer interacts with the list view panel reducer
to make sure that only one of the two panels is open at the same time.

param: {Object} state  Current state.
param: {Object} action Dispatched action.

listViewPanel(state = false, action)   X-Ref
Reducer to set the list view panel open or closed.

Note: this reducer interacts with the inserter panel reducer
to make sure that only one of the two panels is open at the same time.

param: {Object} state  Current state.
param: {Object} action Dispatched action.

listViewToggleRef(state = {current: null})   X-Ref
This reducer does nothing aside initializing a ref to the list view toggle.
We will have a unique ref per "editor" instance.

param: {Object} state
return: {Object} Reference to the list view toggle button.

arrayOf(value)   X-Ref
Returns the first argument as the sole entry in an array.

param: {T} value Value to return.
return: {[T]} Value returned as entry in array.

isObjectLike(value)   X-Ref
Returns true if the value passed is object-like, or false otherwise. A value
is object-like if it can support property assignment, e.g. object or array.

param: {*} value Value to test.
return: {boolean} Whether value is object-like.

createCache()   X-Ref
Creates and returns a new cache object.

return: {Cache} Cache object.

isShallowEqual(a, b, fromIndex)   X-Ref
Returns true if entries within the two arrays are strictly equal by
reference from a starting index.

param: {*[]} a First array.
param: {*[]} b Second array.
param: {number} fromIndex Index from which to start comparison.
return: {boolean} Whether arrays are shallowly equal.

rememo(selector, getDependants)   X-Ref
Returns a memoized selector function. The getDependants function argument is
called before the memoized selector and is expected to return an immutable
reference or array of references on which the selector depends for computing
its own return value. The memoize cache is preserved only as long as those
dependant references remain the same. If getDependants returns a different
reference(s), the cache is cleared and the selector value regenerated.

param: {S} selector Selector function.
param: {GetDependants=} getDependants Dependant getter returning an array of

getCache(dependants)   X-Ref
Returns the cache for a given dependants array. When possible, a WeakMap
will be used to create a unique cache for each set of dependants. This
is feasible due to the nature of WeakMap in allowing garbage collection
to occur on entries where the key object is no longer referenced. Since
WeakMap requires the key to be an object, this is only possible when the
dependant is object-like. The root cache is created as a hierarchy where
each top-level key is the first entry in a dependants set, the value a
WeakMap where each key is the next dependant, and so on. This continues
so long as the dependants are object-like. If no dependants are object-
like, then the cache is shared across all invocations.

param: {*[]} dependants Selector dependants.
return: {Cache} Cache object.

clear()   X-Ref
Resets root memoization cache.


callSelector()   X-Ref
The augmented selector call, considering first whether dependants have
changed before passing it to underlying memoize function.

param: {*}    source    Source object for derivation.
param: {...*} extraArgs Additional arguments to pass to selector.
return: {*} Selector result.

getTemplatePartIcon(iconName)   X-Ref
Helper function to retrieve the corresponding icon by name.

param: {string} iconName The name of the icon.
return: {Object} The corresponding icon.

isEditedPostNew(state)   X-Ref
Returns true if the currently edited post is yet to be saved, or false if
the post has been saved.

param: {Object} state Global application state.
return: {boolean} Whether the post is new.

hasChangedContent(state)   X-Ref
Returns true if content includes unsaved changes, or false otherwise.

param: {Object} state Editor state.
return: {boolean} Whether content includes unsaved changes.

isCleanNewPost(state)   X-Ref
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).

param: {Object} state Global application state.
return: {boolean} Whether new post and unsaved values exist.

getCurrentPostType(state)   X-Ref
Returns the post type of the post currently being edited.

param: {Object} state Global application state.
return: {string} Post type.

getCurrentPostId(state)   X-Ref
Returns the ID of the post currently being edited, or null if the post has
not yet been saved.

param: {Object} state Global application state.
return: {?number} ID of current post.

getCurrentTemplateId(state)   X-Ref
Returns the template ID currently being rendered/edited

param: {Object} state Global application state.
return: {string?} Template ID.

getCurrentPostRevisionsCount(state)   X-Ref
Returns the number of revisions of the post currently being edited.

param: {Object} state Global application state.
return: {number} Number of revisions.

getCurrentPostLastRevisionId(state)   X-Ref
Returns the last revision ID of the post currently being edited,
or null if the post has no revisions.

param: {Object} state Global application state.
return: {?number} ID of the last revision.

getCurrentPostAttribute(state, attributeName)   X-Ref
Returns an attribute value of the saved post.

param: {Object} state         Global application state.
param: {string} attributeName Post attribute name.
return: {*} Post attribute value.

getEditedPostAttribute(state, attributeName)   X-Ref
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.

param: {Object} state         Global application state.
param: {string} attributeName Post attribute name.
return: {*} Post attribute value.

getEditedPostVisibility(state)   X-Ref
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".

param: {Object} state Global application state.
return: {string} Post visibility.

isCurrentPostPending(state)   X-Ref
Returns true if post is pending review.

param: {Object} state Global application state.
return: {boolean} Whether current post is pending review.

isCurrentPostPublished(state, currentPost)   X-Ref
Return true if the current post has already been published.

param: {Object}  state       Global application state.
param: {Object?} currentPost Explicit current post for bypassing registry selector.
return: {boolean} Whether the post has been published.

isCurrentPostScheduled(state)   X-Ref
Returns true if post is already scheduled.

param: {Object} state Global application state.
return: {boolean} Whether current post is scheduled to be posted.

isEditedPostPublishable(state)   X-Ref
Return true if the post being edited can be published.

param: {Object} state Global application state.
return: {boolean} Whether the post can been published.

isEditedPostSaveable(state)   X-Ref
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.

param: {Object} state Global application state.
return: {boolean} Whether the post can be saved.

isEditedPostBeingScheduled(state)   X-Ref
Return true if the post being edited is being scheduled. Preferring the
unsaved status values.

param: {Object} state Global application state.
return: {boolean} Whether the post has been published.

isEditedPostDateFloating(state)   X-Ref
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.

param: {Object} state Editor state.
return: {boolean} Whether the edited post has a floating date value.

isDeletingPost(state)   X-Ref
Returns true if the post is currently being deleted, or false otherwise.

param: {Object} state Editor state.
return: {boolean} Whether post is being deleted.

isSavingPost(state)   X-Ref
Returns true if the post is currently being saved, or false otherwise.

param: {Object} state Global application state.
return: {boolean} Whether post is being saved.

isAutosavingPost(state)   X-Ref
Returns true if the post is autosaving, or false otherwise.

param: {Object} state Global application state.
return: {boolean} Whether the post is autosaving.

isPreviewingPost(state)   X-Ref
Returns true if the post is being previewed, or false otherwise.

param: {Object} state Global application state.
return: {boolean} Whether the post is being previewed.

getEditedPostPreviewLink(state)   X-Ref
Returns the post preview link

param: {Object} state Global application state.
return: {string | undefined} Preview Link.

isPublishingPost(state)   X-Ref
Returns true if the post is being published, or false otherwise.

param: {Object} state Global application state.
return: {boolean} Whether post is being published.

isPermalinkEditable(state)   X-Ref
Returns whether the permalink is editable or not.

param: {Object} state Editor state.
return: {boolean} Whether or not the permalink is editable.

getPermalink(state)   X-Ref
Returns the permalink for the post.

param: {Object} state Editor state.
return: {?string} The permalink, or null if the post is not viewable.

getEditedPostSlug(state)   X-Ref
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.

param: {Object} state Editor state.
return: {string} The current slug to be displayed in the editor

getPermalinkParts(state)   X-Ref
Returns the permalink for a post, split into it's three parts: the prefix,
the postName, and the suffix.

param: {Object} state Editor state.
return: {Object} An object containing the prefix, postName, and suffix for

isPostLocked(state)   X-Ref
Returns whether the post is locked.

param: {Object} state Global application state.
return: {boolean} Is locked.

isPostSavingLocked(state)   X-Ref
Returns whether post saving is locked.

param: {Object} state Global application state.
return: {boolean} Is locked.

isPostAutosavingLocked(state)   X-Ref
Returns whether post autosaving is locked.

param: {Object} state Global application state.
return: {boolean} Is locked.

isPostLockTakeover(state)   X-Ref
Returns whether the edition of the post has been taken over.

param: {Object} state Global application state.
return: {boolean} Is post lock takeover.

getPostLockUser(state)   X-Ref
Returns details about the post lock user.

param: {Object} state Global application state.
return: {Object} A user object.

getActivePostLock(state)   X-Ref
Returns the active post lock.

param: {Object} state Global application state.
return: {Object} The lock object.

canUserUseUnfilteredHTML(state)   X-Ref
Returns whether or not the user has the unfiltered_html capability.

param: {Object} state Editor state.
return: {boolean} Whether the user can or can't post unfiltered HTML.

isEditorPanelRemoved(state, panelName)   X-Ref
Returns true if the given panel was programmatically removed, or false otherwise.
All panels are not removed by default.

param: {Object} state     Global application state.
param: {string} panelName A string that identifies the panel.
return: {boolean} Whether or not the panel is removed.

getEditorSelectionStart(state)   X-Ref
Returns the current selection start.

param: {Object} state
return: {WPBlockSelection} The selection start.

getEditorSelectionEnd(state)   X-Ref
Returns the current selection end.

param: {Object} state
return: {WPBlockSelection} The selection end.

getEditorSelection(state)   X-Ref
Returns the current selection.

param: {Object} state
return: {WPBlockSelection} The selection end.

__unstableIsEditorReady(state)   X-Ref
Is the editor ready

param: {Object} state
return: {boolean} is Ready.

getEditorSettings(state)   X-Ref
Returns the post editor settings.

param: {Object} state Editor state.
return: {Object} The editor settings object.

getRenderingMode(state)   X-Ref
Returns the post editor's rendering mode.

param: {Object} state Editor state.
return: {string} Rendering mode.

getDeviceType(state)   X-Ref
Returns the current editing canvas device type.

param: {Object} state Global application state.
return: {string} Device type.

isListViewOpened(state)   X-Ref
Returns true if the list view is opened.

param: {Object} state Global application state.
return: {boolean} Whether the list view is opened.

isInserterOpened(state)   X-Ref
Returns true if the inserter is opened.

param: {Object} state Global application state.
return: {boolean} Whether the inserter is opened.

getStateBeforeOptimisticTransaction()   X-Ref
Returns state object prior to a specified optimist transaction ID, or `null`
if the transaction corresponding to the given ID cannot be found.


inSomeHistory()   X-Ref
Returns true if an optimistic transaction is pending commit, for which the
before state satisfies the given predicate function.


getBlockEditorSelector(name)   X-Ref
No description

__experimentalGetDefaultTemplateTypes(state)   X-Ref
Returns the default template types.

param: {Object} state Global application state.
return: {Object} The template types.

__experimentalGetTemplateInfo(state, template)   X-Ref
Given a template entity, return information about it which is ready to be
rendered, such as the title, description, and icon.

param: {Object} state    Global application state.
param: {Object} template The template for which we need information.
return: {Object} Information about the template, including title, description, and icon.

postKey(postId, isPostNew)   X-Ref
Function returning a sessionStorage key to set or retrieve a given post's
automatic session backup.

Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's
`loggedout` handler can clear sessionStorage of any user-private content.

param: {string}  postId    Post ID.
param: {boolean} isPostNew Whether post new.
return: {string} sessionStorage key

localAutosaveGet(postId, isPostNew)   X-Ref
No description

localAutosaveSet(postId, isPostNew, title, content, excerpt)   X-Ref
No description

localAutosaveClear(postId, isPostNew)   X-Ref
No description

getNotificationArgumentsForSaveSuccess(data)   X-Ref
Builds the arguments for a success notification dispatch.

param: {Object} data Incoming data to build the arguments from.
return: {Array} Arguments for dispatch. An empty array signals no

getNotificationArgumentsForSaveFail(data)   X-Ref
Builds the fail notification arguments for dispatch.

param: {Object} data Incoming data to build the arguments with.
return: {Array} Arguments for dispatch. An empty array signals no

getNotificationArgumentsForTrashFail(data)   X-Ref
Builds the trash fail notification arguments for dispatch.

param: {Object} data
return: {Array} Arguments for dispatch.

__experimentalTearDownEditor()   X-Ref
Returns an action object signalling that the editor is being destroyed and
that any necessary state or side-effect cleanup should occur.

return: {Object} Action object.

resetPost()   X-Ref
Returns an action object used in signalling that the latest version of the
post has been received, either by initialization or save.


updatePost()   X-Ref
Returns an action object used in signalling that a patch of updates for the
latest version of the post have been received.

return: {Object} Action object.

setupEditorState(post)   X-Ref
Setup the editor state.

param: {Object} post Post object.

setEditedPost(postType, postId)   X-Ref
Returns an action that sets the current post Type and post ID.

param: {string} postType Post Type.
param: {string} postId   Post ID.
return: {Object} Action object.

refreshPost()   X-Ref
Action for refreshing the current post.


createUndoLevel()   X-Ref
Action that creates an undo history record.


updatePostLock(lock)   X-Ref
Action that locks the editor.

param: {Object} lock Details about the post lock status, user, and nonce.
return: {Object} Action object.

lockPostSaving(lockName)   X-Ref
Action that locks post saving.

param: {string} lockName The lock name.
return: {Object} Action object

unlockPostSaving(lockName)   X-Ref
Action that unlocks post saving.

param: {string} lockName The lock name.
return: {Object} Action object

lockPostAutosaving(lockName)   X-Ref
Action that locks post autosaving.

param: {string} lockName The lock name.
return: {Object} Action object

unlockPostAutosaving(lockName)   X-Ref
Action that unlocks post autosaving.

param: {string} lockName The lock name.
return: {Object} Action object

updateEditorSettings(settings)   X-Ref
No description

setDeviceType(deviceType)   X-Ref
Action that changes the width of the editing canvas.

param: {string} deviceType
return: {Object} Action object.

removeEditorPanel(panelName)   X-Ref
Returns an action object used to remove a panel from the editor.

param: {string} panelName A string that identifies the panel to remove.
return: {Object} Action object.

setIsInserterOpened(value)   X-Ref
Returns an action object used to open/close the inserter.

param: {boolean|Object} value                Whether the inserter should be
param: {string}         value.rootClientId   The root client ID to insert at.
param: {number}         value.insertionIndex The index to insert at.
return: {Object} Action object.

setIsListViewOpened(isOpen)   X-Ref
Returns an action object used to open/close the list view.

param: {boolean} isOpen A boolean representing whether the list view should be opened or closed.
return: {Object} Action object.

setCurrentTemplateId(id)   X-Ref
Returns an action object used to set which template is currently being used/edited.

param: {string} id Template Id.
return: {Object} Action object.

getListViewToggleRef(state)   X-Ref
No description

shimAttributeSource(settings)   X-Ref
Filters a registered block's settings to enhance a block's `edit` component
to upgrade meta-sourced attributes to use the post's meta entity property.

param: {WPBlockSettings} settings Registered block settings.
return: {WPBlockSettings} Filtered block settings.

getUserLabel(user)   X-Ref
No description

setDefaultCompleters(completers = [])   X-Ref
Internal dependencies


BindingUpdater(props)   X-Ref
No description

ControlsWithStoreSubscription(props)   X-Ref
No description

EditorKeyboardShortcuts()   X-Ref
Internal dependencies




Generated : Tue Mar 19 08:20:01 2024 Cross-referenced by PHPXref