UNPKG

@atlaskit/editor-common

Version:

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

43 lines (42 loc) 1.5 kB
/// <reference types="react" /> import type { LinkPickerProps } from '@atlaskit/link-picker'; import type { INPUT_METHOD } from '../analytics'; import type { CardOptions } from '../card'; import type { EditorAppearance } from './editor-appearance'; export type LinkInputType = INPUT_METHOD.MANUAL | INPUT_METHOD.TYPEAHEAD; /** * Configuration for the link picker * Extends `LinkPickerProps` to provide future extensibility out-of-the-box */ export type LinkPickerOptions = Partial<LinkPickerProps>; /** * Configuration for editor linking behaviours */ export interface LinkingOptions { /** * Initial props to configure the link picker component with. Primarily used to provide link search and suggestions capabilities. * @see https://atlaskit.atlassian.com/packages/editor/editor-core/example/full-page-with-link-picker * @see https://atlaskit.atlassian.com/packages/linking-platform/link-picker */ linkPicker?: LinkPickerOptions; /** * Enables and configure smart link behaviour */ smartLinks?: CardOptions; } type OnClickCallback = ({ event, url, }: { event: React.MouseEvent<HTMLAnchorElement>; url?: string; }) => void; /** * Configuration for the Hyperlink plugin */ export interface HyperlinkPluginOptions { linkPicker?: LinkPickerOptions; platform?: 'mobile' | 'web'; editorAppearance?: EditorAppearance; lpLinkPicker?: boolean; disableFloatingToolbar?: boolean; onClickCallback?: OnClickCallback; } export {};