[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
The identifier for the data store.
File Size: | 716 lines (23 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
applyAnnotations(record, annotations = []) X-Ref |
Applies given annotations to the given record. return: {Object} A record with the annotations applied. param: {Object} record The record to apply annotations to. param: {Array} annotations The annotation to apply. |
removeAnnotations(record) X-Ref |
Removes annotations from the given record. return: {Object} The cleaned record. param: {Object} record Record to remove annotations from. |
retrieveAnnotationPositions(formats) X-Ref |
Retrieves the positions of annotations inside an array of formats. return: {Object} ID keyed positions of annotations. param: {Array} formats Formats with annotations in there. |
updateAnnotationsWithPositions(annotations, positions, {removeAnnotation,updateAnnotationRange}) X-Ref |
Updates annotations in the state based on positions retrieved from RichText. param: {Array} annotations The annotations that are currently applied. param: {Array} positions The current positions of the given annotations. param: {Object} actions param: {Function} actions.removeAnnotation Function to remove an annotation from the state. param: {Function} actions.updateAnnotationRange Function to update an annotation range in the state. |
filterWithReference(collection, predicate) X-Ref |
Filters an array based on the predicate, but keeps the reference the same if the array hasn't changed. return: {Array} Filtered array. param: {Array} collection The collection to filter. param: {Function} predicate Function that determines if the item should stay |
isValidAnnotationRange(annotation) X-Ref |
Verifies whether the given annotations is a valid annotation. return: {boolean} Whether the given annotation is valid. param: {Object} annotation The annotation to verify. |
annotations(state = {}, action) X-Ref |
Reducer managing annotations. return: {Array} Updated state. param: {Object} state The annotations currently shown in the editor. param: {Object} action Dispatched action. |
__experimentalGetAllAnnotationsForBlock(state, blockClientId) X-Ref |
No description |
__experimentalGetAnnotations(state) X-Ref |
Returns all annotations in the editor state. return: {Array} All annotations currently applied. param: {Object} state Editor state. |
rng() X-Ref |
No description |
unsafeStringify(arr, offset = 0) X-Ref |
No description |
stringify(arr, offset = 0) X-Ref |
No description |
v4(options, buf, offset) X-Ref |
No description |
__experimentalAddAnnotation({blockClientId,richTextIdentifier = null,range = null,selector = 'range',source = 'default',id = esm_browser_v4() X-Ref |
Adds an annotation to a block. The `block` attribute refers to a block ID that needs to be annotated. `isBlockAnnotation` controls whether or not the annotation is a block annotation. The `source` is the source of the annotation, this will be used to identity groups of annotations. The `range` property is only relevant if the selector is 'range'. return: {Object} Action object. param: {Object} annotation The annotation to add. param: {string} annotation.blockClientId The blockClientId to add the annotation to. param: {string} annotation.richTextIdentifier Identifier for the RichText instance the annotation applies to. param: {WPAnnotationRange} annotation.range The range at which to apply this annotation. param: {string} [annotation.selector="range"] The way to apply this annotation. param: {string} [annotation.source="default"] The source that added the annotation. param: {string} [annotation.id] The ID the annotation should have. Generates a UUID by default. |
__experimentalRemoveAnnotation(annotationId) X-Ref |
Removes an annotation with a specific ID. return: {Object} Action object. param: {string} annotationId The annotation to remove. |
__experimentalUpdateAnnotationRange(annotationId, start, end) X-Ref |
Updates the range of an annotation. return: {Object} Action object. param: {string} annotationId ID of the annotation to update. param: {number} start The start of the new range. param: {number} end The end of the new range. |
__experimentalRemoveAnnotationsBySource(source) X-Ref |
Removes all annotations of a specific source. return: {Object} Action object. param: {string} source The source to remove. |
Generated : Thu Apr 10 08:20:01 2025 | Cross-referenced by PHPXref |