UNPKG

@atlaskit/editor-common

Version:

A package that contains common classes and components for editor and renderer

23 lines (22 loc) 1.19 kB
import type { ADFEntity } from '@atlaskit/adf-utils/types'; import type { ErrorCallbackOptions, Validate, ValidationError } from '@atlaskit/adf-utils/validatorTypes'; import type { Schema } from '@atlaskit/editor-prosemirror/model'; export declare const UNSUPPORTED_NODE_ATTRIBUTE = "unsupportedNodeAttribute"; import type { UnsupportedContentPayload } from './unsupportedContent/types'; export type DispatchAnalyticsEvent = (event: UnsupportedContentPayload) => void; export declare const validationErrorHandler: (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions, marks: string[], validate: Validate, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => ADFEntity | { attrs: { originalValue: ADFEntity; }; type: string; } | undefined; export declare const validateADFEntity: (schema: Schema, node: ADFEntity, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, validationOverrides?: { allowNestedTables?: boolean; allowTableInPanel?: boolean; }) => ADFEntity; export declare function wrapWithUnsupported(originalValue: ADFEntity, type?: 'block' | 'inline' | 'mark'): { attrs: { originalValue: ADFEntity; }; type: string; };