@atlaskit/editor-plugin-mentions
Version:
Mentions plugin for @atlaskit/editor-core
94 lines (73 loc) • 2.61 kB
Markdown
<!-- API Report Version: 2.3 -->
## API Report File for "@atlaskit/editor-plugin-mentions"
> 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
<!--SECTION START: Main Entry Types-->
```ts
/// <reference types="react" />
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
import type { MentionDescription } from '@atlaskit/mention';
import type { MentionProvider } from '@atlaskit/mention';
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
// @public (undocumented)
export interface MentionPluginConfig {
// (undocumented)
HighlightComponent?: React.ComponentType;
// (undocumented)
insertDisplayName?: boolean;
}
// @public (undocumented)
interface MentionPluginOptions extends MentionPluginConfig {
// (undocumented)
allowZeroWidthSpaceAfter?: boolean;
// (undocumented)
sanitizePrivateContent?: boolean;
}
// @public (undocumented)
type MentionPluginState = {
mentionProvider?: MentionProvider;
contextIdentifierProvider?: ContextIdentifierProvider;
mentions?: Array<MentionDescription>;
canInsertMention?: boolean;
};
// @public (undocumented)
type MentionSharedState = MentionPluginState & {
typeAheadHandler: TypeAheadHandler;
};
// @public (undocumented)
export type MentionsPlugin = NextEditorPlugin<
'mention',
{
pluginConfiguration: MentionPluginOptions | undefined;
dependencies: [OptionalPlugin<AnalyticsPlugin>, TypeAheadPlugin];
sharedState: MentionSharedState | undefined;
actions: {
openTypeAhead: (inputMethod: TypeAheadInputMethod) => boolean;
};
}
>;
// @public (undocumented)
export const mentionsPlugin: MentionsPlugin;
// (No @packageDocumentation comment for this package)
```
<!--SECTION END: Main Entry Types-->
### Peer Dependencies
<!--SECTION START: Peer Dependencies-->
```json
{
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-intl": "npm:react-intl@^5.18.1"
}
```
<!--SECTION END: Peer Dependencies-->