@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyberyozh/text-editor",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Rich text editor library based on Tiptap for CyberYozh",
5
5
  "author": "CyberYozh",
6
6
  "license": "MIT",
@@ -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);