@manuscripts/body-editor 1.7.3 → 1.7.4
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.
|
@@ -5,13 +5,7 @@ const transform_1 = require("@manuscripts/transform");
|
|
|
5
5
|
function findHighlightMarkers(doc) {
|
|
6
6
|
const markers = [];
|
|
7
7
|
let current;
|
|
8
|
-
const commentIds = [];
|
|
9
8
|
doc.descendants((node, pos) => {
|
|
10
|
-
if (node.type.name === transform_1.schema.nodes.comments.name) {
|
|
11
|
-
node.content.forEach(({ attrs }) => {
|
|
12
|
-
commentIds.push(attrs.id);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
9
|
if ((0, transform_1.isHighlightMarkerNode)(node)) {
|
|
16
10
|
const { position, tid, id } = node.attrs;
|
|
17
11
|
if (position === 'start') {
|
|
@@ -27,6 +21,6 @@ function findHighlightMarkers(doc) {
|
|
|
27
21
|
}
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
|
-
return markers
|
|
24
|
+
return markers;
|
|
31
25
|
}
|
|
32
26
|
exports.findHighlightMarkers = findHighlightMarkers;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { isHighlightMarkerNode
|
|
1
|
+
import { isHighlightMarkerNode } from '@manuscripts/transform';
|
|
2
2
|
export function findHighlightMarkers(doc) {
|
|
3
3
|
const markers = [];
|
|
4
4
|
let current;
|
|
5
|
-
const commentIds = [];
|
|
6
5
|
doc.descendants((node, pos) => {
|
|
7
|
-
if (node.type.name === schema.nodes.comments.name) {
|
|
8
|
-
node.content.forEach(({ attrs }) => {
|
|
9
|
-
commentIds.push(attrs.id);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
6
|
if (isHighlightMarkerNode(node)) {
|
|
13
7
|
const { position, tid, id } = node.attrs;
|
|
14
8
|
if (position === 'start') {
|
|
@@ -24,5 +18,5 @@ export function findHighlightMarkers(doc) {
|
|
|
24
18
|
}
|
|
25
19
|
}
|
|
26
20
|
});
|
|
27
|
-
return markers
|
|
21
|
+
return markers;
|
|
28
22
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.4",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -109,4 +109,4 @@
|
|
|
109
109
|
"resolutions": {
|
|
110
110
|
"@types/react": "^17.0.2"
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
package/styles/Editor.css
CHANGED