1 | import type { ProsemirrorPlugin } from '@remirror/core-types';
|
2 | import { PasteRule } from '@remirror/pm/paste-rules';
|
3 | import { PlainExtension } from '../extension';
|
4 | export interface PasteRulesOptions {
|
5 | }
|
6 | /**
|
7 | * This extension allows others extension to add the `createPasteRules` method
|
8 | * for automatically transforming pasted text which matches a certain regex
|
9 | * pattern in the dom.
|
10 | *
|
11 | * @category Builtin Extension
|
12 | */
|
13 | export declare class PasteRulesExtension extends PlainExtension {
|
14 | get name(): "pasteRules";
|
15 | createExternalPlugins(): ProsemirrorPlugin[];
|
16 | private generatePasteRulesPlugin;
|
17 | }
|
18 | declare global {
|
19 | namespace Remirror {
|
20 | interface ExcludeOptions {
|
21 | /**
|
22 | * Whether to exclude the extension's pasteRules
|
23 | *
|
24 | * @defaultValue undefined
|
25 | */
|
26 | pasteRules?: boolean;
|
27 | }
|
28 | interface BaseExtension {
|
29 | /**
|
30 | * Register paste rules for this extension.
|
31 | *
|
32 | * Paste rules are activated when text, images, or html is pasted into the
|
33 | * editor.
|
34 | */
|
35 | createPasteRules?(): PasteRule[] | PasteRule;
|
36 | }
|
37 | interface AllExtensions {
|
38 | pasteRules: PasteRulesExtension;
|
39 | }
|
40 | }
|
41 | }
|