@cyberyozh/text-editor 0.1.14 → 0.1.15
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/editor.js +2 -1
- package/dist/editor.js.map +1 -1
- package/dist/editor.mjs +2 -1
- package/dist/editor.mjs.map +1 -1
- package/dist/render.js +2 -1
- package/dist/render.js.map +1 -1
- package/dist/render.mjs +2 -1
- package/dist/render.mjs.map +1 -1
- package/package.json +1 -1
- package/src/utils/html-to-tiptap-content.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { generateJSON, type JSONContent } from "@tiptap/core";
|
|
2
2
|
import { getSharedExtensions } from "./get-shared-extensions";
|
|
3
3
|
import { BaseFigure } from "@/extensions/base/figure";
|
|
4
|
+
import { TableKit } from "@tiptap/extension-table";
|
|
5
|
+
import { BaseCodeBlock } from "@/extensions/base";
|
|
4
6
|
|
|
5
7
|
function isJSONContent(value: unknown): value is JSONContent {
|
|
6
8
|
return (
|
|
@@ -30,7 +32,7 @@ export function htmlToTiptapContent(content: string | JSONContent): JSONContent
|
|
|
30
32
|
|
|
31
33
|
const sharedExtensions = getSharedExtensions();
|
|
32
34
|
|
|
33
|
-
const extensions = [...sharedExtensions, BaseFigure];
|
|
35
|
+
const extensions = [...sharedExtensions, BaseFigure, TableKit, BaseCodeBlock];
|
|
34
36
|
|
|
35
37
|
try {
|
|
36
38
|
return generateJSON(content, extensions);
|