@paroicms/tiptap-editor-plugin 1.0.5 → 1.0.6

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.
@@ -13,16 +13,16 @@ export const CustomLink = Link.extend({
13
13
  addAttributes() {
14
14
  return {
15
15
  href: {
16
- default: undefined,
16
+ default: null,
17
17
  },
18
18
  target: {
19
- default: undefined,
19
+ default: null,
20
20
  },
21
21
  rel: {
22
- default: undefined,
22
+ default: null,
23
23
  },
24
24
  class: {
25
- default: undefined,
25
+ default: null,
26
26
  },
27
27
  };
28
28
  },
@@ -2,6 +2,8 @@ import { escapeHtml, stripHtmlTags } from "@paroicms/public-server-lib";
2
2
  import { Mark } from "@tiptap/core";
3
3
  import Code from "@tiptap/extension-code";
4
4
  import CodeBlockLowlight from "@tiptap/extension-code-block-lowlight";
5
+ import Document from "@tiptap/extension-document";
6
+ import { BulletList, ListItem, OrderedList } from "@tiptap/extension-list";
5
7
  import Subscript from "@tiptap/extension-subscript";
6
8
  import Superscript from "@tiptap/extension-superscript";
7
9
  import TextAlign from "@tiptap/extension-text-align";
@@ -14,6 +16,15 @@ import { createInternalLinkNodeBackend, preloadInternalLinkDocuments, } from "./
14
16
  import { createMediaNodeBackend, preloadMediaImages, } from "./extensions/media-node.js";
15
17
  import { createObfuscateMarkBackend, createObfuscateMarkRenderer, } from "./extensions/obfuscate-mark.js";
16
18
  import { createPlatformVideoNodeBackend } from "./extensions/platform-video-node.js";
19
+ // Fix for Tiptap 3.10.5+ schema validation:
20
+ // Use 'block*' (zero or more) to avoid both the generatable node error
21
+ // and the infinite recursion issue with 'block+' (one or more)
22
+ const CustomDocument = Document.extend({
23
+ content: "block*",
24
+ });
25
+ const CustomListItem = ListItem.extend({
26
+ content: "block*",
27
+ });
17
28
  const TextSize = Mark.create({
18
29
  name: "textSize",
19
30
  addAttributes() {
@@ -119,16 +130,23 @@ function collectCodeBlockLanguages(json) {
119
130
  function renderTiptapToHtml(json, service, mediaMap, documentMap, options) {
120
131
  const hasCodeInConf = service.pluginService.configuration.adminUi?.code ?? false;
121
132
  const extensions = [
133
+ CustomDocument,
122
134
  StarterKit.configure({
135
+ document: false,
136
+ bulletList: false,
137
+ orderedList: false,
138
+ listItem: false,
123
139
  code: hasCodeInConf ? false : undefined,
124
140
  codeBlock: hasCodeInConf ? false : undefined,
125
141
  link: false, // Disable default Link to use CustomLink instead
126
142
  }),
143
+ BulletList,
144
+ OrderedList,
145
+ CustomListItem,
127
146
  CustomLink,
128
147
  ...(hasCodeInConf ? [Code, CodeBlockLowlight] : []),
129
148
  TextAlign.configure({
130
149
  types: ["heading", "paragraph"],
131
- defaultAlignment: undefined,
132
150
  }),
133
151
  TextStyle,
134
152
  TextSize,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/tiptap-editor-plugin",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Tiptap editor plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -29,30 +29,30 @@
29
29
  "test:watch": "vitest"
30
30
  },
31
31
  "dependencies": {
32
- "@paroicms/script-lib": "0.3.5",
33
- "@tiptap/core": "~3.7.2",
34
- "@tiptap/extension-code": "~3.7.2",
35
- "@tiptap/extension-code-block-lowlight": "~3.7.2",
36
- "@tiptap/extension-subscript": "~3.7.2",
37
- "@tiptap/extension-superscript": "~3.7.2",
38
- "@tiptap/extension-text-align": "~3.7.2",
39
- "@tiptap/extension-text-style": "~3.7.2",
40
- "@tiptap/starter-kit": "~3.7.2",
41
- "@tiptap/static-renderer": "~3.7.2",
42
- "arktype": "~2.1.23"
32
+ "@paroicms/script-lib": "0.3.6",
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",
42
+ "arktype": "~2.1.26"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@paroicms/public-anywhere-lib": "0",
46
46
  "@paroicms/public-server-lib": "0"
47
47
  },
48
48
  "devDependencies": {
49
- "@paroicms/public-anywhere-lib": "0.38.0",
50
- "@paroicms/public-server-lib": "0.48.0",
51
- "@types/node": "~24.8.1",
52
- "rimraf": "~6.0.1",
53
- "sass": "~1.93.2",
49
+ "@paroicms/public-anywhere-lib": "0.38.1",
50
+ "@paroicms/public-server-lib": "0.48.1",
51
+ "@types/node": "~24.10.1",
52
+ "rimraf": "~6.1.0",
53
+ "sass": "~1.94.0",
54
54
  "typescript": "~5.9.3",
55
- "vitest": "~3.2.4"
55
+ "vitest": "~4.0.9"
56
56
  },
57
57
  "type": "module",
58
58
  "main": "backend/dist/index.js",