@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 CHANGED
@@ -3276,8 +3276,8 @@ img.ProseMirror-separator {
3276
3276
  opacity: 0
3277
3277
  }`;
3278
3278
 
3279
- function createStyleTag(style, nonce) {
3280
- const tiptapStyleTag = document.querySelector('style[data-tiptap-style]');
3279
+ function createStyleTag(style, nonce, suffix) {
3280
+ const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ''}]`);
3281
3281
  if (tiptapStyleTag !== null) {
3282
3282
  return tiptapStyleTag;
3283
3283
  }
@@ -3285,7 +3285,7 @@ function createStyleTag(style, nonce) {
3285
3285
  if (nonce) {
3286
3286
  styleNode.setAttribute('nonce', nonce);
3287
3287
  }
3288
- styleNode.setAttribute('data-tiptap-style', '');
3288
+ styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ''}`, '');
3289
3289
  styleNode.innerHTML = style;
3290
3290
  document.getElementsByTagName('head')[0].appendChild(styleNode);
3291
3291
  return styleNode;