Type: Function

A callback function that returns contextual operations.

This function should return the ContextualOperations for this annotation.

Note that the Content Quality product already renders the heading and the 'Show more details' button on the root level. Do not render a menuGroupHeading on the root level of your configuration, or make sure it does not conflict with the product generated heading.

Example usage


(annotationId, metadata) => {
    if (!annotationId || !metadata || !metadata.replacements) {
        return [];

    return metadata.replacements
        .map(replacement => {
            return {
                operationData: {
                    text: replacement
                name: 'my-custom-operation',
                label: replacement,
                icon: 'fas fa-font'
        .slice(0, 6);


  1. annotationId

    The annotation identifier.

  2. metadata


    Type: Object

    The annotation metadata.


The contextual operations for this annotation.