@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.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('style[data-tiptap-style]');
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('data-tiptap-style', '');
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;