## API Report File for "@atlaskit/editor-core"
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
### Table of contents
- [Main Entry Types](#main-entry-types)
- [Peer Dependencies](#peer-dependencies)
### Main Entry Types
```ts
///
///
import { AbstractMentionResource } from '@atlaskit/mention/resource';
import { ACTION } from '@atlaskit/editor-common/analytics';
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
import { ActivityProvider } from '@atlaskit/activity-provider';
import { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
import { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit/analytics-next/AnalyticsEvent';
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
import { AnnotationTypes } from '@atlaskit/adf-schema';
import { BrowserFreezetracking } from '@atlaskit/editor-common/types';
import { CardOptions } from '@atlaskit/editor-common/card';
import { CardProvider } from '@atlaskit/editor-common/provider-factory';
import { Color } from '@atlaskit/status/element';
import { Command as Command_2 } from '@atlaskit/editor-common/types';
import { ComponentType } from 'react';
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
import { ContextUpdateHandler } from '@atlaskit/editor-common/types';
import { createTable } from '@atlaskit/editor-plugin-table/commands';
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
import { CreateUIAnalyticsEvent as CreateUIAnalyticsEvent_2 } from '@atlaskit/analytics-next/types';
import { darkModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
import { DecorationSet } from 'prosemirror-view';
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
import { DirectEditorProps } from 'prosemirror-view';
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
import { DropdownOptionT } from '@atlaskit/editor-common/types';
import { EditorActionsOptions } from '@atlaskit/editor-common/types';
import { EditorAppearance } from '@atlaskit/editor-common/types';
import { FeatureFlags as EditorFeatureFlags } from '@atlaskit/editor-common/types';
import { EditorPlugin } from '@atlaskit/editor-common/types';
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
import { EditorReactContext } from '@atlaskit/editor-common/types';
import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
import { EditorState } from 'prosemirror-state';
import { EditorView } from 'prosemirror-view';
import { EmojiResource } from '@atlaskit/emoji/resource';
import { EmptyStateHandler } from '@atlaskit/editor-common/types';
import { ErrorReporter } from '@atlaskit/editor-common/utils';
import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
import { EventEmitter as EventEmitter_2 } from 'events';
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
import { ExtensionType } from '@atlaskit/editor-common/provider-factory';
import { FC } from 'react';
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
import { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
import { FloatingToolbarButton } from '@atlaskit/editor-common/types';
import { FloatingToolbarColorPicker } from '@atlaskit/editor-common/types';
import { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
import { FloatingToolbarDatePicker } from '@atlaskit/editor-common/types';
import { FloatingToolbarDropdown } from '@atlaskit/editor-common/types';
import { FloatingToolbarEmojiPicker } from '@atlaskit/editor-common/types';
import { FloatingToolbarInput } from '@atlaskit/editor-common/types';
import { FloatingToolbarItem } from '@atlaskit/editor-common/types';
import { FloatingToolbarListPicker } from '@atlaskit/editor-common/types';
import { FloatingToolbarSelect } from '@atlaskit/editor-common/types';
import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
import { Side as GapCursorSide } from '@atlaskit/editor-common/selection';
import { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
import { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
import { InputTracking } from '@atlaskit/editor-common/types';
import { IntlShape } from 'react-intl-next';
import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
import { jsx } from '@emotion/react';
import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
import { LinkPickerProps } from '@atlaskit/link-picker';
import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
import { MarkConfig } from '@atlaskit/editor-common/types';
import { MediaClientConfig } from '@atlaskit/media-core';
import { MediaFeatureFlags } from '@atlaskit/media-common';
import { MediaFeatureFlags as MediaFeatureFlags_2 } from '@atlaskit/media-common/mediaFeatureFlags';
import { MediaFile } from '@atlaskit/media-picker/types';
import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
import { MentionDescription } from '@atlaskit/mention';
import { MentionProvider } from '@atlaskit/mention/resource';
import { MentionProvider as MentionProvider_2 } from '@atlaskit/mention';
import { MentionResource } from '@atlaskit/mention/resource';
import { MenuItem } from '@atlaskit/editor-common/ui-menu';
import { default as messages } from '@atlaskit/editor-common/messages';
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
import { Node as Node_2 } from 'prosemirror-model';
import { NodeConfig } from '@atlaskit/editor-common/types';
import { NodeType } from 'prosemirror-model';
import { NodeView } from 'prosemirror-view';
import { OptionalPlugin } from '@atlaskit/editor-common/types';
import { PaletteColor } from '@atlaskit/editor-common/ui-color';
import { PerformanceTracking } from '@atlaskit/editor-common/types';
import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
import { PluginKey } from 'prosemirror-state';
import { PMPlugin } from '@atlaskit/editor-common/types';
import { PositionType } from '@atlaskit/tooltip/types';
import { PresenceProvider } from '@atlaskit/mention/resource';
import { PresenceResource } from '@atlaskit/mention/resource';
import PropTypes from 'prop-types';
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
import { Providers } from '@atlaskit/editor-common/provider-factory';
import { PureComponent } from 'react';
import { QuickInsertActionInsert } from '@atlaskit/editor-common/provider-factory';
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
import { QuickInsertItemId } from '@atlaskit/editor-common/provider-factory';
import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
import { default as React_2 } from 'react';
import { ReactElement } from 'react';
import { RefObject } from 'react';
import { ReplaceRawValue } from '@atlaskit/editor-common/types';
import type { ResolvedEditorState } from '@atlaskit/collab-provider';
import { RichMediaLayout } from '@atlaskit/adf-schema';
import { Schema } from 'prosemirror-model';
import type { SearchProvider } from '@atlaskit/editor-common/provider-factory';
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
import type { SelectOption } from '@atlaskit/editor-common/types';
import { setTextSelection } from '@atlaskit/editor-common/utils';
import { SEVERITY } from '@atlaskit/editor-common/utils';
import { TaskDecisionProvider } from '@atlaskit/task-decision';
import { TeamMentionResource } from '@atlaskit/mention/team-resource';
import type { ThemeModes } from '@atlaskit/theme/types';
import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
import { Transaction } from 'prosemirror-state';
import { TransactionTracking } from '@atlaskit/editor-common/types';
import { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
import type { TypeAheadItem } from '@atlaskit/editor-common/types';
import type { TypeAheadItem as TypeAheadItem_2 } from '@atlaskit/editor-common/provider-factory';
import type { TypeAheadStats } from '@atlaskit/editor-common/types';
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
import { UIComponentFactory } from '@atlaskit/editor-common/types';
import { UploadEndEventPayload } from '@atlaskit/media-picker/types';
import { UploadErrorEventPayload } from '@atlaskit/media-picker/types';
import { UploadParams } from '@atlaskit/media-picker/types';
import { UploadPreviewUpdateEventPayload } from '@atlaskit/media-picker/types';
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
import { WithIntlProps } from 'react-intl-next';
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
import { WrappedComponentProps } from 'react-intl-next';
export { AbstractMentionResource };
export { ACTION };
export { ACTION_SUBJECT };
export { ACTION_SUBJECT_ID };
// @public (undocumented)
type AddItemTransactionCreator = (opts: {
state: EditorState;
tr: Transaction;
list: NodeType;
item: NodeType;
listLocalId: string;
itemLocalId: string;
}) => Transaction | null;
// @public (undocumented)
type AllowedBlockTypes = 'blockquote' | 'codeBlock' | 'hardBreak' | 'heading';
// @public (undocumented)
interface AllSelectionData {
// (undocumented)
type: 'all';
}
export { AnalyticsEventPayload };
// @public (undocumented)
type AnnotationComponentProps = {
textSelection?: string;
dom?: HTMLElement;
onClose?: () => void;
};
// @public (undocumented)
export type AnnotationInfo = {
id: string;
type: AnnotationTypes.INLINE_COMMENT;
};
// @public (undocumented)
export interface AnnotationProviders {
// (undocumented)
inlineComment: InlineCommentAnnotationProvider;
}
// @public (undocumented)
export interface AnnotationState {
// (undocumented)
annotationType: Type;
// (undocumented)
id: string;
// (undocumented)
state: State;
}
// @public (undocumented)
export interface AnnotationTypeProvider {
// (undocumented)
disallowOnWhitespace?: boolean;
// (undocumented)
getState: (
annotationIds: string[],
) => Promise[]>;
// (undocumented)
updateSubscriber?: AnnotationUpdateEmitter;
}
// @public (undocumented)
export class AnnotationUpdateEmitter extends EventEmitter_2 {
// (undocumented)
on(event: VisibilityEvent, listener: (isVisible: boolean) => void): this;
// (undocumented)
on(event: UpdateEvent, listener: (annotationId: string) => void): this;
}
// @public (undocumented)
interface BasePluginOptions {
// (undocumented)
allowInlineCursorTarget?: boolean;
// (undocumented)
allowScrollGutter?: ScrollGutterPluginOptions;
// (undocumented)
browserFreezeTracking?: BrowserFreezetracking;
// (undocumented)
inputTracking?: InputTracking;
// (undocumented)
ufo?: boolean;
}
// @public (undocumented)
type BasePortalProviderProps = {
render: (
portalProviderAPI: PortalProviderAPI,
) => JSX.Element | React_2.ReactChild | null;
onAnalyticsEvent?: FireAnalyticsCallback;
useAnalyticsContext?: boolean;
themeMode?: ThemeModes;
} & WrappedComponentProps;
// @public (undocumented)
export class BaseReactEditorView extends ReactEditorView_2 {}
// @public (undocumented)
type BeforeAndAfterToolbarComponents = {
before: ReactComponents;
after: ReactComponents;
};
// @public (undocumented)
export const blockPluginStateKey: PluginKey;
// @public (undocumented)
interface BlockType {
// (undocumented)
level?: HeadingLevelsAndNormalText;
// (undocumented)
name: string;
// (undocumented)
nodeName: string;
// (undocumented)
tagName?: string;
// (undocumented)
title: MessageDescriptor;
}
// @public (undocumented)
export type BlockTypeInputMethod =
| INPUT_METHOD.FORMATTING
| INPUT_METHOD.INSERT_MENU
| INPUT_METHOD.KEYBOARD
| INPUT_METHOD.SHORTCUT
| INPUT_METHOD.TOOLBAR;
// @public (undocumented)
interface BlockTypePluginOptions {
// (undocumented)
allowBlockType?: {
exclude?: Array;
};
// (undocumented)
isUndoRedoButtonsEnabled?: boolean;
// (undocumented)
lastNodeMustBeParagraph?: boolean;
}
// @public (undocumented)
export type BlockTypeState = {
currentBlockType: BlockType;
blockTypesDisabled: boolean;
availableBlockTypes: BlockType[];
availableWrapperBlockTypes: BlockType[];
};
export { CardProvider };
// @public (undocumented)
interface CellSelectionData {
// (undocumented)
anchor: number;
// (undocumented)
head: number;
// (undocumented)
type: 'cell';
}
// @public (undocumented)
export const changeColor: (color: string) => Command;
// @public (undocumented)
export const clearEditorContent: Command;
// @public (undocumented)
type CloseOptions = {
insertCurrentQueryAsRawText: boolean;
attachCommand?: Command;
};
// @public (undocumented)
interface CodeBlockOptions extends LongPressSelectionPluginOptions {
// (undocumented)
allowCompositionInputOverride?: boolean;
// (undocumented)
allowCopyToClipboard?: boolean;
// (undocumented)
appearance?: EditorAppearance | undefined;
}
// @public (undocumented)
interface CollabAnalyticsProps {
EXPERIMENTAL_allowInternalErrorAnalytics?: boolean;
}
// @public (undocumented)
type CollabEditOptions = {
provider?: Providers['collabEditProvider'];
userId?: string;
useNativePlugin?: boolean;
} & CollabInviteToEditProps &
CollabAnalyticsProps;
// @public (undocumented)
interface CollabInviteToEditProps {
// (undocumented)
inviteToEditComponent?: React.ComponentType;
// (undocumented)
inviteToEditHandler?: (event: React.MouseEvent) => void;
// (undocumented)
isInviteToEditButtonSelected?: boolean;
}
// @public (undocumented)
export class CollapsedEditor extends React_2.Component {
// (undocumented)
componentDidUpdate(): void;
// (undocumented)
editorComponent?: Editor | EditorMigrationComponent | EditorNext;
// (undocumented)
handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
// (undocumented)
previouslyExpanded?: boolean;
// (undocumented)
render(): JSX.Element;
}
// @public (undocumented)
export type Command = (
state: EditorState,
dispatch?: CommandDispatch,
view?: EditorView,
) => boolean;
// @public (undocumented)
export type CommandDispatch = (tr: Transaction) => void;
// @public (undocumented)
export const commitStatusPicker: () => (editorView: EditorView) => void;
// @public (undocumented)
type ConfigWithNodeInfo = {
config: FloatingToolbarConfig | undefined;
pos: number;
node: Node_2;
};
// @public (undocumented)
type Context = {
editorActions?: EditorActions;
intl: IntlShape;
};
// @public (undocumented)
export function ContextPanel(props: Props_4): jsx.JSX.Element;
// @public (undocumented)
interface CreateEditorStateOptions {
// (undocumented)
context: EditorReactContext;
// (undocumented)
doc?: Object | Node_2 | string;
// (undocumented)
props: EditorViewProps;
// (undocumented)
resetting?: boolean;
// (undocumented)
selectionAtStart?: boolean;
}
// @public (undocumented)
export const createQuickInsertTools: (editorView: EditorView) => {
getItems: (
query: string,
options?: QuickInsertPluginOptions,
) => QuickInsertItem[];
};
export { createTable };
// @public (undocumented)
export const createTypeAheadTools: (editorView: EditorView) => {
isOpen: () => TypeAheadHandler | false;
currentQuery: () => string;
close: (options?: CloseOptions) => boolean;
openMention: (inputMethod: TypeAheadInputMethod) => boolean;
searchMention: (query?: string) => {
type: (appendValue: string) => Promise | undefined;
result: () => Promise;
close: (options?: CloseOptions) => boolean;
insert: ({
index,
mode,
}: {
index: number;
mode?: SelectItemMode | undefined;
}) => Promise;
};
openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
searchQuickInsert: (query?: string) => {
type: (appendValue: string) => Promise | undefined;
result: () => Promise;
close: (options?: CloseOptions) => boolean;
insert: ({
index,
mode,
}: {
index: number;
mode?: SelectItemMode | undefined;
}) => Promise;
};
openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
searchEmoji: (query?: string) => {
type: (appendValue: string) => Promise | undefined;
result: () => Promise;
close: (options?: CloseOptions) => boolean;
insert: ({
index,
mode,
}: {
index: number;
mode?: SelectItemMode | undefined;
}) => Promise;
};
insertItemMention: ({
contentItem,
query,
sourceListItem,
}: InsertItemProps) => boolean;
insertItemEmoji: ({
contentItem,
query,
sourceListItem,
}: InsertItemProps) => boolean;
insertItemQuickInsert: ({
contentItem,
query,
sourceListItem,
}: InsertItemProps) => boolean;
};
// @public (undocumented)
export interface CustomMediaPicker {
// (undocumented)
destroy(): void;
// (undocumented)
emit(event: string, data: any): void;
// (undocumented)
on(event: string, cb: Listener): void;
// (undocumented)
removeAllListeners(event: any): void;
// (undocumented)
setUploadParams(uploadParams: UploadParams): void;
}
export { darkModeStatusColorPalette };
// @public (undocumented)
export const dateMessages: {
editText: {
id: string;
defaultMessage: string;
description: string;
};
};
// @public (undocumented)
export const datePluginKey: PluginKey;
// @public (undocumented)
export type DatePluginState = {
isQuickInsertAction?: boolean;
isNew: boolean;
showDatePickerAt: null | number;
isDateEmpty: boolean;
focusDateInput: boolean;
};
// @public
export function dateToDateType(date: Date): DateType;
// @public (undocumented)
type DateType = {
year: number;
month: number;
day?: number;
};
// @public (undocumented)
export function dedupe(list?: T[], iteratee?: (p: T) => T | T[keyof T]): T[];
export { DEFAULT_BORDER_COLOR };
// @public (undocumented)
type DefaultPresetPluginOptions = {
paste: PastePluginOptions;
base?: BasePluginOptions;
blockType?: BlockTypePluginOptions;
placeholder?: PlaceholderPluginOptions;
textFormatting?: TextFormattingOptions;
submitEditor?: EditorProps_2['onSave'];
annotationProviders?: AnnotationProviders;
quickInsert?: QuickInsertPluginOptions;
codeBlock?: CodeBlockOptions;
selection?: SelectionPluginOptions;
cardOptions?: CardOptions;
hyperlinkOptions?: HyperlinkPluginOptions;
createAnalyticsEvent?: CreateUIAnalyticsEvent;
typeAhead?: TypeAheadPluginOptions;
allowAnalyticsGASV3?: boolean;
performanceTracking?: EditorProps['performanceTracking'];
};
// @public
export const deleteDate: () => Command;
export { DropdownOptionT };
// @public (undocumented)
type EditInsertedState = {
type: HyperlinkInsertStatus.EDIT_INSERTED_TOOLBAR;
node: Node_2;
pos: number;
};
// @public (undocumented)
export class Editor extends React_2.Component<
EditorProps,
ProviderFactoryState & PresetState
> {
constructor(props: EditorProps, context: Context);
componentDidMount(): void;
componentDidUpdate(prevProps: EditorProps): void;
componentWillUnmount(): void;
// (undocumented)
static contextTypes: {
editorActions: PropTypes.Requireable