@tiptap/core 2.0.0-beta.157 → 2.0.0-beta.158
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/dist/tiptap-core.cjs.js +10 -5
- package/dist/tiptap-core.cjs.js.map +1 -1
- package/dist/tiptap-core.esm.js +10 -5
- package/dist/tiptap-core.esm.js.map +1 -1
- package/dist/tiptap-core.umd.js +10 -5
- package/dist/tiptap-core.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/helpers/getDebugJSON.ts +12 -5
package/dist/tiptap-core.esm.js
CHANGED
|
@@ -4251,12 +4251,17 @@ function getChangedRanges(transform) {
|
|
|
4251
4251
|
function getDebugJSON(node, startOffset = 0) {
|
|
4252
4252
|
const isTopNode = node.type === node.type.schema.topNodeType;
|
|
4253
4253
|
const increment = isTopNode ? 0 : 1;
|
|
4254
|
-
const from = startOffset;
|
|
4254
|
+
const from = startOffset;
|
|
4255
4255
|
const to = from + node.nodeSize;
|
|
4256
|
-
const marks = node.marks.map(mark =>
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4256
|
+
const marks = node.marks.map(mark => {
|
|
4257
|
+
const output = {
|
|
4258
|
+
type: mark.type.name,
|
|
4259
|
+
};
|
|
4260
|
+
if (Object.keys(mark.attrs).length) {
|
|
4261
|
+
output.attrs = { ...mark.attrs };
|
|
4262
|
+
}
|
|
4263
|
+
return output;
|
|
4264
|
+
});
|
|
4260
4265
|
const attrs = { ...node.attrs };
|
|
4261
4266
|
const output = {
|
|
4262
4267
|
type: node.type.name,
|