@tiptap/core 2.0.2 → 2.0.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.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/packages/core/src/utilities/createStyleTag.d.ts +1 -1
- package/package.json +2 -2
- package/src/utilities/createStyleTag.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -3272,8 +3272,8 @@ img.ProseMirror-separator {
|
|
|
3272
3272
|
opacity: 0
|
|
3273
3273
|
}`;
|
|
3274
3274
|
|
|
3275
|
-
function createStyleTag(style, nonce) {
|
|
3276
|
-
const tiptapStyleTag = document.querySelector(
|
|
3275
|
+
function createStyleTag(style, nonce, suffix) {
|
|
3276
|
+
const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`);
|
|
3277
3277
|
if (tiptapStyleTag !== null) {
|
|
3278
3278
|
return tiptapStyleTag;
|
|
3279
3279
|
}
|
|
@@ -3281,7 +3281,7 @@ function createStyleTag(style, nonce) {
|
|
|
3281
3281
|
if (nonce) {
|
|
3282
3282
|
styleNode.setAttribute('nonce', nonce);
|
|
3283
3283
|
}
|
|
3284
|
-
styleNode.setAttribute(
|
|
3284
|
+
styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '');
|
|
3285
3285
|
styleNode.innerHTML = style;
|
|
3286
3286
|
document.getElementsByTagName('head')[0].appendChild(styleNode);
|
|
3287
3287
|
return styleNode;
|