tiptap-editor-custom-stg 1.0.12 → 1.0.14
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/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +37 -37
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _tiptap_extension_table from '@tiptap/extension-table';
|
|
3
|
+
import * as _tiptap_extensions from '@tiptap/extensions';
|
|
4
|
+
import * as _tiptap_extension_text_align from '@tiptap/extension-text-align';
|
|
5
|
+
import * as _tiptap_extension_text_style from '@tiptap/extension-text-style';
|
|
6
|
+
import * as _tiptap_extension_image from '@tiptap/extension-image';
|
|
3
7
|
import * as _tiptap_extension_underline from '@tiptap/extension-underline';
|
|
8
|
+
import * as _tiptap_extension_link from '@tiptap/extension-link';
|
|
9
|
+
import * as _tiptap_starter_kit from '@tiptap/starter-kit';
|
|
4
10
|
import * as _tiptap_core from '@tiptap/core';
|
|
5
11
|
import { Extension } from '@tiptap/core';
|
|
6
12
|
|
|
@@ -31,7 +37,7 @@ interface TiptapEditorProps {
|
|
|
31
37
|
|
|
32
38
|
declare const TiptapEditor: React.FC<TiptapEditorProps>;
|
|
33
39
|
|
|
34
|
-
declare const createTiptapExtensions: (placeholder?: string) => (_tiptap_core.Extension<any, any> | _tiptap_core.Mark<_tiptap_extension_underline.UnderlineOptions, any> | _tiptap_core.Node<
|
|
40
|
+
declare const createTiptapExtensions: (placeholder?: string) => (_tiptap_core.Extension<any, any> | _tiptap_core.Extension<_tiptap_starter_kit.StarterKitOptions, any> | _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Mark<_tiptap_extension_underline.UnderlineOptions, any> | _tiptap_core.Node<_tiptap_extension_image.ImageOptions, any> | _tiptap_core.Mark<_tiptap_extension_text_style.TextStyleOptions, any> | _tiptap_core.Extension<_tiptap_extension_text_style.FontFamilyOptions, any> | _tiptap_core.Extension<_tiptap_extension_text_align.TextAlignOptions, any> | _tiptap_core.Extension<_tiptap_extensions.PlaceholderOptions, any> | _tiptap_core.Node<_tiptap_extension_table.TableOptions, any> | _tiptap_core.Node<_tiptap_extension_table.TableRowOptions, any>)[];
|
|
35
41
|
|
|
36
42
|
declare module '@tiptap/core' {
|
|
37
43
|
interface Commands<ReturnType> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _tiptap_extension_table from '@tiptap/extension-table';
|
|
3
|
+
import * as _tiptap_extensions from '@tiptap/extensions';
|
|
4
|
+
import * as _tiptap_extension_text_align from '@tiptap/extension-text-align';
|
|
5
|
+
import * as _tiptap_extension_text_style from '@tiptap/extension-text-style';
|
|
6
|
+
import * as _tiptap_extension_image from '@tiptap/extension-image';
|
|
3
7
|
import * as _tiptap_extension_underline from '@tiptap/extension-underline';
|
|
8
|
+
import * as _tiptap_extension_link from '@tiptap/extension-link';
|
|
9
|
+
import * as _tiptap_starter_kit from '@tiptap/starter-kit';
|
|
4
10
|
import * as _tiptap_core from '@tiptap/core';
|
|
5
11
|
import { Extension } from '@tiptap/core';
|
|
6
12
|
|
|
@@ -31,7 +37,7 @@ interface TiptapEditorProps {
|
|
|
31
37
|
|
|
32
38
|
declare const TiptapEditor: React.FC<TiptapEditorProps>;
|
|
33
39
|
|
|
34
|
-
declare const createTiptapExtensions: (placeholder?: string) => (_tiptap_core.Extension<any, any> | _tiptap_core.Mark<_tiptap_extension_underline.UnderlineOptions, any> | _tiptap_core.Node<
|
|
40
|
+
declare const createTiptapExtensions: (placeholder?: string) => (_tiptap_core.Extension<any, any> | _tiptap_core.Extension<_tiptap_starter_kit.StarterKitOptions, any> | _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Mark<_tiptap_extension_underline.UnderlineOptions, any> | _tiptap_core.Node<_tiptap_extension_image.ImageOptions, any> | _tiptap_core.Mark<_tiptap_extension_text_style.TextStyleOptions, any> | _tiptap_core.Extension<_tiptap_extension_text_style.FontFamilyOptions, any> | _tiptap_core.Extension<_tiptap_extension_text_align.TextAlignOptions, any> | _tiptap_core.Extension<_tiptap_extensions.PlaceholderOptions, any> | _tiptap_core.Node<_tiptap_extension_table.TableOptions, any> | _tiptap_core.Node<_tiptap_extension_table.TableRowOptions, any>)[];
|
|
35
41
|
|
|
36
42
|
declare module '@tiptap/core' {
|
|
37
43
|
interface Commands<ReturnType> {
|
package/dist/index.js
CHANGED
|
@@ -166,7 +166,7 @@ var createTiptapExtensions = (placeholder = "Enter content here...") => [
|
|
|
166
166
|
HTMLAttributes: { rel: "noopener noreferrer" }
|
|
167
167
|
}),
|
|
168
168
|
import_extension_underline.default,
|
|
169
|
-
import_extension_image.default.configure({ inline: false, allowBase64:
|
|
169
|
+
import_extension_image.default.configure({ inline: false, allowBase64: true }),
|
|
170
170
|
import_extension_text_style3.TextStyle,
|
|
171
171
|
FontSize,
|
|
172
172
|
BackgroundColor,
|
|
@@ -1111,7 +1111,7 @@ var TiptapEditor = ({
|
|
|
1111
1111
|
if (!initializedRef.current) {
|
|
1112
1112
|
initializedRef.current = true;
|
|
1113
1113
|
if (content && content !== editor.getHTML()) {
|
|
1114
|
-
editor.commands.setContent(content || "", false);
|
|
1114
|
+
editor.commands.setContent(content || "", { emitUpdate: false });
|
|
1115
1115
|
lastEmittedContentRef.current = content;
|
|
1116
1116
|
}
|
|
1117
1117
|
return;
|
|
@@ -1126,7 +1126,7 @@ var TiptapEditor = ({
|
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
1128
1128
|
if (content !== editor.getHTML()) {
|
|
1129
|
-
editor.commands.setContent(content || "", false);
|
|
1129
|
+
editor.commands.setContent(content || "", { emitUpdate: false });
|
|
1130
1130
|
lastEmittedContentRef.current = content || "";
|
|
1131
1131
|
}
|
|
1132
1132
|
}, [content, editor]);
|
|
@@ -1137,7 +1137,7 @@ var TiptapEditor = ({
|
|
|
1137
1137
|
(0, import_react2.useEffect)(() => {
|
|
1138
1138
|
if (!editor || !onRegisterReset) return;
|
|
1139
1139
|
const handleReset = (newContent) => {
|
|
1140
|
-
editor.commands.setContent(newContent || "", false);
|
|
1140
|
+
editor.commands.setContent(newContent || "", { emitUpdate: false });
|
|
1141
1141
|
};
|
|
1142
1142
|
const unregister = onRegisterReset(handleReset);
|
|
1143
1143
|
return () => {
|