@paroicms/tiptap-editor-plugin 1.0.8 → 1.1.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.
@@ -1,3 +1,4 @@
1
+ import { convertMarkdownToTiptap } from "@paroicms/markdown-to-tiptap-json";
1
2
  import { isJsonFieldValue, isObj } from "@paroicms/public-anywhere-lib";
2
3
  import { makeStylesheetLinkAsyncTag } from "@paroicms/public-server-lib";
3
4
  import { esmDirName, extractPackageNameAndVersionSync } from "@paroicms/script-lib";
@@ -44,6 +45,16 @@ const plugin = {
44
45
  }
45
46
  return { j: newJson };
46
47
  });
48
+ service.registerHook("markdownToNative", ({ service, value }) => {
49
+ if (typeof value !== "string") {
50
+ throw new Error("Tiptap markdownToNative hook received non-string value");
51
+ }
52
+ const { result, issues } = convertMarkdownToTiptap(value);
53
+ if (issues && issues.length > 0) {
54
+ service.logger.warn("Markdown conversion issues:", issues);
55
+ }
56
+ return { j: result };
57
+ });
47
58
  service.registerHeadTags(({ state }) => {
48
59
  if (!state.get("paTiptapEditor:html"))
49
60
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/tiptap-editor-plugin",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "description": "Tiptap editor plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -29,16 +29,17 @@
29
29
  "test:watch": "vitest"
30
30
  },
31
31
  "dependencies": {
32
- "@paroicms/script-lib": "0.3.7",
33
- "@tiptap/core": "3.10.7",
34
- "@tiptap/extension-code": "3.10.7",
35
- "@tiptap/extension-code-block-lowlight": "3.10.7",
36
- "@tiptap/extension-subscript": "3.10.7",
37
- "@tiptap/extension-superscript": "3.10.7",
38
- "@tiptap/extension-text-align": "3.10.7",
39
- "@tiptap/extension-text-style": "3.10.7",
40
- "@tiptap/starter-kit": "3.10.7",
41
- "@tiptap/static-renderer": "3.10.7",
32
+ "@paroicms/markdown-to-tiptap-json": "0.2.5",
33
+ "@paroicms/script-lib": "0.3.9",
34
+ "@tiptap/core": "3.11.0",
35
+ "@tiptap/extension-code": "3.11.0",
36
+ "@tiptap/extension-code-block-lowlight": "3.11.0",
37
+ "@tiptap/extension-subscript": "3.11.0",
38
+ "@tiptap/extension-superscript": "3.11.0",
39
+ "@tiptap/extension-text-align": "3.11.0",
40
+ "@tiptap/extension-text-style": "3.11.0",
41
+ "@tiptap/starter-kit": "3.11.0",
42
+ "@tiptap/static-renderer": "3.11.0",
42
43
  "arktype": "~2.1.27"
43
44
  },
44
45
  "peerDependencies": {
@@ -46,13 +47,13 @@
46
47
  "@paroicms/public-server-lib": "0"
47
48
  },
48
49
  "devDependencies": {
49
- "@paroicms/public-anywhere-lib": "0.38.2",
50
- "@paroicms/public-server-lib": "0.48.4",
50
+ "@paroicms/public-anywhere-lib": "0.39.0",
51
+ "@paroicms/public-server-lib": "0.49.0",
51
52
  "@types/node": "~24.10.1",
52
- "rimraf": "~6.1.0",
53
- "sass": "~1.94.0",
53
+ "rimraf": "~6.1.2",
54
+ "sass": "~1.94.2",
54
55
  "typescript": "~5.9.3",
55
- "vitest": "~4.0.10"
56
+ "vitest": "~4.0.13"
56
57
  },
57
58
  "type": "module",
58
59
  "main": "backend/dist/index.js",