Sanity Library Reference Docs
    Preparing search index...

    Type Alias OnPasteFnBeta

    OnPasteFn: (data: PasteData) => OnPasteResultOrPromise

    Custom paste handler for Portable Text in Sanity Studio.

    Type declaration

      • (data: PasteData): OnPasteResultOrPromise
      • Parameters

        Returns OnPasteResultOrPromise

    It is encouraged not to return Promise<undefined> from the OnPasteFn as a mechanism to fall back to the native paste behaviour. This doesn't work in all cases. Always return plain undefined if possible.