dn-react-text-editor 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create_text_editor.d.mts +9 -19
- package/dist/create_text_editor.d.ts +9 -19
- package/dist/create_text_editor.js +432 -448
- package/dist/create_text_editor.mjs +433 -449
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/index.d.mts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.js +435 -449
- package/dist/index.mjs +435 -450
- package/dist/input.d.mts +6 -8
- package/dist/input.d.ts +6 -8
- package/dist/input.js +1 -6
- package/dist/input.mjs +1 -6
- package/dist/text_editor_controller.d.mts +29 -16
- package/dist/text_editor_controller.d.ts +29 -16
- package/dist/text_editor_controller.js +604 -107
- package/dist/text_editor_controller.mjs +602 -105
- package/package.json +55 -55
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { DetailedHTMLProps, InputHTMLAttributes,
|
|
2
|
-
import {
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
import { createSchema } from './schema.mjs';
|
|
5
|
-
import { Subject } from 'rxjs';
|
|
6
|
-
import { createCommands } from './commands.mjs';
|
|
7
|
-
import { TextEditorControllerProps, CreateTextEditorOptions } from './text_editor_controller.mjs';
|
|
8
|
-
import 'orderedmap';
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes, FC } from 'react';
|
|
2
|
+
import { TextEditorController, TextEditorControllerProps, CreateTextEditorOptions } from './text_editor_controller.mjs';
|
|
9
3
|
import 'prosemirror-model';
|
|
4
|
+
import 'prosemirror-state';
|
|
5
|
+
import 'prosemirror-view';
|
|
10
6
|
import './attach_file.mjs';
|
|
7
|
+
import './schema.mjs';
|
|
8
|
+
import 'orderedmap';
|
|
9
|
+
import 'rxjs';
|
|
11
10
|
|
|
12
|
-
type TextEditorController = {
|
|
13
|
-
schema: ReturnType<typeof createSchema>;
|
|
14
|
-
view: EditorView;
|
|
15
|
-
subject: Subject<Transaction>;
|
|
16
|
-
set value(value: string);
|
|
17
|
-
get value(): string;
|
|
18
|
-
} & {
|
|
19
|
-
commands: ReturnType<typeof createCommands>;
|
|
20
|
-
};
|
|
21
11
|
type HTMLElementProps = DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
22
12
|
type TextEditorProps = Omit<HTMLElementProps, "ref"> & {
|
|
23
|
-
|
|
13
|
+
controller?: TextEditorController;
|
|
24
14
|
name?: string;
|
|
25
15
|
} & TextEditorControllerProps;
|
|
26
16
|
declare function createTextEditor(options?: CreateTextEditorOptions): FC<TextEditorProps>;
|
|
27
17
|
|
|
28
|
-
export { type
|
|
18
|
+
export { type TextEditorProps, createTextEditor };
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { DetailedHTMLProps, InputHTMLAttributes,
|
|
2
|
-
import {
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
import { createSchema } from './schema.js';
|
|
5
|
-
import { Subject } from 'rxjs';
|
|
6
|
-
import { createCommands } from './commands.js';
|
|
7
|
-
import { TextEditorControllerProps, CreateTextEditorOptions } from './text_editor_controller.js';
|
|
8
|
-
import 'orderedmap';
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes, FC } from 'react';
|
|
2
|
+
import { TextEditorController, TextEditorControllerProps, CreateTextEditorOptions } from './text_editor_controller.js';
|
|
9
3
|
import 'prosemirror-model';
|
|
4
|
+
import 'prosemirror-state';
|
|
5
|
+
import 'prosemirror-view';
|
|
10
6
|
import './attach_file.js';
|
|
7
|
+
import './schema.js';
|
|
8
|
+
import 'orderedmap';
|
|
9
|
+
import 'rxjs';
|
|
11
10
|
|
|
12
|
-
type TextEditorController = {
|
|
13
|
-
schema: ReturnType<typeof createSchema>;
|
|
14
|
-
view: EditorView;
|
|
15
|
-
subject: Subject<Transaction>;
|
|
16
|
-
set value(value: string);
|
|
17
|
-
get value(): string;
|
|
18
|
-
} & {
|
|
19
|
-
commands: ReturnType<typeof createCommands>;
|
|
20
|
-
};
|
|
21
11
|
type HTMLElementProps = DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
22
12
|
type TextEditorProps = Omit<HTMLElementProps, "ref"> & {
|
|
23
|
-
|
|
13
|
+
controller?: TextEditorController;
|
|
24
14
|
name?: string;
|
|
25
15
|
} & TextEditorControllerProps;
|
|
26
16
|
declare function createTextEditor(options?: CreateTextEditorOptions): FC<TextEditorProps>;
|
|
27
17
|
|
|
28
|
-
export { type
|
|
18
|
+
export { type TextEditorProps, createTextEditor };
|