@tiptap/core 2.11.0 → 2.11.1
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/Editor.d.ts +1 -1
- package/dist/Editor.d.ts.map +1 -1
- package/dist/EventEmitter.d.ts.map +1 -1
- package/dist/Mark.d.ts.map +1 -1
- package/dist/Node.d.ts.map +1 -1
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +6 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/isFunction.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Editor.ts +2 -1
- package/src/EventEmitter.ts +1 -1
- package/src/Mark.ts +1 -0
- package/src/Node.ts +1 -0
- package/src/PasteRule.ts +2 -2
- package/src/commands/joinItemBackward.ts +1 -1
- package/src/commands/joinItemForward.ts +1 -1
- package/src/helpers/getSchemaByResolvedExtensions.ts +1 -1
- package/src/types.ts +1 -1
- package/src/utilities/isFunction.ts +1 -0
- package/src/utilities/mergeAttributes.ts +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
320
320
|
if (key === 'class') {
|
|
321
|
-
const valueClasses = value ? value.split(' ') : [];
|
|
321
|
+
const valueClasses = value ? String(value).split(' ') : [];
|
|
322
322
|
const existingClasses = mergedAttributes[key] ? mergedAttributes[key].split(' ') : [];
|
|
323
323
|
const insertClasses = valueClasses.filter(valueClass => !existingClasses.includes(valueClass));
|
|
324
324
|
mergedAttributes[key] = [...existingClasses, ...insertClasses].join(' ');
|
|
@@ -360,6 +360,7 @@
|
|
|
360
360
|
.reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {});
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
363
364
|
function isFunction(value) {
|
|
364
365
|
return typeof value === 'function';
|
|
365
366
|
}
|
|
@@ -1019,7 +1020,7 @@
|
|
|
1019
1020
|
try {
|
|
1020
1021
|
dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
|
|
1021
1022
|
}
|
|
1022
|
-
catch
|
|
1023
|
+
catch {
|
|
1023
1024
|
dropEvent = null;
|
|
1024
1025
|
}
|
|
1025
1026
|
const processEvent = ({ state, from, to, rule, pasteEvt, }) => {
|
|
@@ -1043,7 +1044,7 @@
|
|
|
1043
1044
|
try {
|
|
1044
1045
|
dropEvent = typeof DragEvent !== 'undefined' ? new DragEvent('drop') : null;
|
|
1045
1046
|
}
|
|
1046
|
-
catch
|
|
1047
|
+
catch {
|
|
1047
1048
|
dropEvent = null;
|
|
1048
1049
|
}
|
|
1049
1050
|
pasteEvent = typeof ClipboardEvent !== 'undefined' ? new ClipboardEvent('paste') : null;
|
|
@@ -2158,7 +2159,7 @@
|
|
|
2158
2159
|
}
|
|
2159
2160
|
return true;
|
|
2160
2161
|
}
|
|
2161
|
-
catch
|
|
2162
|
+
catch {
|
|
2162
2163
|
return false;
|
|
2163
2164
|
}
|
|
2164
2165
|
};
|
|
@@ -2175,7 +2176,7 @@
|
|
|
2175
2176
|
}
|
|
2176
2177
|
return true;
|
|
2177
2178
|
}
|
|
2178
|
-
catch
|
|
2179
|
+
catch {
|
|
2179
2180
|
return false;
|
|
2180
2181
|
}
|
|
2181
2182
|
};
|