@fibery/prosemirror-schema 6.0.1 → 7.0.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.
@@ -10,7 +10,6 @@ type Meta = {
10
10
  export interface EntityAttributes {
11
11
  id: string;
12
12
  typeId: string;
13
- text?: string;
14
13
  meta: Meta;
15
14
  }
16
15
  export interface EntityDefinition {
@@ -5,7 +5,6 @@ const entity = {
5
5
  selectable: false,
6
6
  attrs: {
7
7
  id: { default: "" },
8
- text: { default: "" },
9
8
  typeId: { default: "" },
10
9
  meta: { default: {} }
11
10
  },
@@ -21,28 +20,23 @@ const entity = {
21
20
  meta.contextEntityPublicId = dom.getAttribute("data-context-entity-public-id") || "";
22
21
  return {
23
22
  id: dom.getAttribute("data-entity-id"),
24
- text: dom.textContent,
25
23
  typeId: dom.getAttribute("data-entity-type-id"),
26
24
  meta
27
25
  };
28
26
  }
29
27
  }],
30
28
  toDOM(node) {
31
- const { id, typeId, text, meta } = node.attrs;
32
- return [
33
- "span",
34
- {
35
- "data-entity-id": id,
36
- "data-entity-type-id": typeId,
37
- "data-comment": meta.comment,
38
- "data-anchor": meta.anchor,
39
- "data-field": meta.field,
40
- "data-context-entity-type-id": meta.contextEntityTypeId,
41
- "data-context-entity-public-id": meta.contextEntityPublicId,
42
- contenteditable: "false"
43
- },
44
- text
45
- ];
29
+ const { id, typeId, meta } = node.attrs;
30
+ return ["span", {
31
+ "data-entity-id": id,
32
+ "data-entity-type-id": typeId,
33
+ "data-comment": meta.comment,
34
+ "data-anchor": meta.anchor,
35
+ "data-field": meta.field,
36
+ "data-context-entity-type-id": meta.contextEntityTypeId,
37
+ "data-context-entity-public-id": meta.contextEntityPublicId,
38
+ contenteditable: "false"
39
+ }];
46
40
  }
47
41
  };
48
42
  //#endregion
@@ -3,7 +3,6 @@ import { NodeSpec } from "prosemirror-model";
3
3
  export interface MentionAttributes {
4
4
  id: string;
5
5
  typeId: string;
6
- name?: string;
7
6
  }
8
7
  export interface MentionDefinition {
9
8
  type: "mention";
@@ -5,7 +5,6 @@ const mention = {
5
5
  selectable: false,
6
6
  attrs: {
7
7
  id: { default: "" },
8
- name: { default: "" },
9
8
  typeId: { default: "" },
10
9
  meta: { default: {} }
11
10
  },
@@ -15,22 +14,17 @@ const mention = {
15
14
  const dom = domNode;
16
15
  return {
17
16
  id: dom.getAttribute("data-mention-id"),
18
- name: dom.textContent,
19
17
  typeId: dom.getAttribute("data-mention-type-id")
20
18
  };
21
19
  }
22
20
  }],
23
21
  toDOM(node) {
24
- const { id, typeId, name } = node.attrs;
25
- return [
26
- "span",
27
- {
28
- "data-mention-id": id,
29
- "data-mention-type-id": typeId,
30
- contenteditable: "false"
31
- },
32
- name
33
- ];
22
+ const { id, typeId } = node.attrs;
23
+ return ["span", {
24
+ "data-mention-id": id,
25
+ "data-mention-type-id": typeId,
26
+ contenteditable: "false"
27
+ }];
34
28
  }
35
29
  };
36
30
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/prosemirror-schema",
3
- "version": "6.0.1",
3
+ "version": "7.0.0",
4
4
  "description": "Fibery prosemirror schema",
5
5
  "license": "UNLICENSED",
6
6
  "files": [