vue2-bbl-editor 1.4.1 → 1.4.3
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/vue2-bbl-editor.common.js +354 -122
- package/dist/vue2-bbl-editor.css +1 -1
- package/dist/vue2-bbl-editor.umd.js +354 -122
- package/dist/vue2-bbl-editor.umd.min.js +354 -122
- package/package.json +1 -1
|
@@ -193,7 +193,7 @@ function _typeof(o) {
|
|
|
193
193
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
194
194
|
}, _typeof(o);
|
|
195
195
|
}
|
|
196
|
-
var _excluded = ["width", "height", "align", "caption", "captionPosition", "spacing"];
|
|
196
|
+
var _excluded = ["width", "height", "align", "caption", "captionPosition", "spacing", "display"];
|
|
197
197
|
function ownKeys(e, r) {
|
|
198
198
|
var t = Object.keys(e);
|
|
199
199
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -308,9 +308,13 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
308
308
|
|
|
309
309
|
/* harmony default export */ __webpack_exports__["a"] = (_tiptap_core__WEBPACK_IMPORTED_MODULE_0__["Node"].create({
|
|
310
310
|
name: 'resizableVideo',
|
|
311
|
-
group: '
|
|
312
|
-
inline: true,
|
|
311
|
+
group: 'block',
|
|
313
312
|
atom: true,
|
|
313
|
+
addOptions: function addOptions() {
|
|
314
|
+
return {
|
|
315
|
+
HTMLAttributes: {}
|
|
316
|
+
};
|
|
317
|
+
},
|
|
314
318
|
addAttributes: function addAttributes() {
|
|
315
319
|
return {
|
|
316
320
|
src: {
|
|
@@ -349,19 +353,58 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
349
353
|
return [{
|
|
350
354
|
tag: 'iframe[src*="youtube.com"]',
|
|
351
355
|
getAttrs: function getAttrs(element) {
|
|
356
|
+
// Extract width and height from style if available
|
|
357
|
+
var style = element.getAttribute('style') || '';
|
|
358
|
+
var widthMatch = style.match(/width:\s*(\d+)px/);
|
|
359
|
+
var heightMatch = style.match(/height:\s*(\d+)px/);
|
|
352
360
|
return {
|
|
353
361
|
src: element.getAttribute('src'),
|
|
354
|
-
width: element.getAttribute('width') || 560,
|
|
355
|
-
height: element.getAttribute('height') || 315
|
|
362
|
+
width: widthMatch ? parseInt(widthMatch[1]) : element.getAttribute('width') || 560,
|
|
363
|
+
height: heightMatch ? parseInt(heightMatch[1]) : element.getAttribute('height') || 315,
|
|
364
|
+
align: element.getAttribute('data-align') || 'left',
|
|
365
|
+
spacing: element.getAttribute('data-spacing') || 'medium',
|
|
366
|
+
controls: element.getAttribute('controls') !== 'false',
|
|
367
|
+
nocookie: element.getAttribute('nocookie') === 'true'
|
|
356
368
|
};
|
|
357
369
|
}
|
|
358
370
|
}, {
|
|
359
371
|
tag: 'iframe[src*="youtu.be"]',
|
|
360
372
|
getAttrs: function getAttrs(element) {
|
|
373
|
+
// Extract width and height from style if available
|
|
374
|
+
var style = element.getAttribute('style') || '';
|
|
375
|
+
var widthMatch = style.match(/width:\s*(\d+)px/);
|
|
376
|
+
var heightMatch = style.match(/height:\s*(\d+)px/);
|
|
361
377
|
return {
|
|
362
378
|
src: element.getAttribute('src'),
|
|
363
|
-
width: element.getAttribute('width') || 560,
|
|
364
|
-
height: element.getAttribute('height') || 315
|
|
379
|
+
width: widthMatch ? parseInt(widthMatch[1]) : element.getAttribute('width') || 560,
|
|
380
|
+
height: heightMatch ? parseInt(heightMatch[1]) : element.getAttribute('height') || 315,
|
|
381
|
+
align: element.getAttribute('data-align') || 'left',
|
|
382
|
+
spacing: element.getAttribute('data-spacing') || 'medium',
|
|
383
|
+
controls: element.getAttribute('controls') !== 'false',
|
|
384
|
+
nocookie: element.getAttribute('nocookie') === 'true'
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
}, {
|
|
388
|
+
tag: 'figure',
|
|
389
|
+
getAttrs: function getAttrs(element) {
|
|
390
|
+
var iframe = element.querySelector('iframe[src*="youtube.com"], iframe[src*="youtu.be"]');
|
|
391
|
+
var figcaption = element.querySelector('figcaption');
|
|
392
|
+
if (!iframe) return false;
|
|
393
|
+
|
|
394
|
+
// Extract width and height from style if available
|
|
395
|
+
var style = iframe.getAttribute('style') || '';
|
|
396
|
+
var widthMatch = style.match(/width:\s*(\d+)px/);
|
|
397
|
+
var heightMatch = style.match(/height:\s*(\d+)px/);
|
|
398
|
+
return {
|
|
399
|
+
src: iframe.getAttribute('src'),
|
|
400
|
+
width: widthMatch ? parseInt(widthMatch[1]) : iframe.getAttribute('width') || 560,
|
|
401
|
+
height: heightMatch ? parseInt(heightMatch[1]) : iframe.getAttribute('height') || 315,
|
|
402
|
+
align: element.getAttribute('data-align') || iframe.getAttribute('data-align') || 'left',
|
|
403
|
+
spacing: element.getAttribute('data-spacing') || iframe.getAttribute('data-spacing') || 'medium',
|
|
404
|
+
controls: iframe.getAttribute('controls') !== 'false',
|
|
405
|
+
nocookie: iframe.getAttribute('nocookie') === 'true',
|
|
406
|
+
caption: figcaption ? figcaption.textContent : '',
|
|
407
|
+
captionPosition: figcaption ? 'bottom' : 'none'
|
|
365
408
|
};
|
|
366
409
|
}
|
|
367
410
|
}];
|
|
@@ -374,6 +417,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
374
417
|
caption = HTMLAttributes.caption,
|
|
375
418
|
captionPosition = HTMLAttributes.captionPosition,
|
|
376
419
|
spacing = HTMLAttributes.spacing,
|
|
420
|
+
display = HTMLAttributes.display,
|
|
377
421
|
attrs = _objectWithoutProperties(HTMLAttributes, _excluded);
|
|
378
422
|
|
|
379
423
|
// Determine spacing values
|
|
@@ -387,12 +431,42 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
387
431
|
// Build inline styles for iframe with proper text wrapping
|
|
388
432
|
var iframeStyle = 'border: none; border-radius: 8px; max-width: 100%; vertical-align: top;';
|
|
389
433
|
if (width) {
|
|
390
|
-
iframeStyle += " width: ".concat(width
|
|
434
|
+
iframeStyle += " width: ".concat(width, "px;");
|
|
391
435
|
}
|
|
392
436
|
if (height) {
|
|
393
437
|
iframeStyle += " height: ".concat(height, "px;");
|
|
394
438
|
}
|
|
395
439
|
|
|
440
|
+
// Handle display mode
|
|
441
|
+
if (display === 'inline') {
|
|
442
|
+
// Inline display - video flows with text
|
|
443
|
+
iframeStyle += ' display: inline-block; vertical-align: top;';
|
|
444
|
+
if (align === 'center') {
|
|
445
|
+
// For inline center, we still need a wrapper
|
|
446
|
+
return ['div', {
|
|
447
|
+
style: 'text-align: center; display: block; margin: 0.5em 0;',
|
|
448
|
+
'data-display': display,
|
|
449
|
+
'data-align': align,
|
|
450
|
+
'data-spacing': spacing
|
|
451
|
+
}, ['iframe', Object(_tiptap_core__WEBPACK_IMPORTED_MODULE_0__["mergeAttributes"])(attrs, {
|
|
452
|
+
frameborder: '0',
|
|
453
|
+
allowfullscreen: 'true',
|
|
454
|
+
style: iframeStyle
|
|
455
|
+
})]];
|
|
456
|
+
} else {
|
|
457
|
+
// Simple inline iframe
|
|
458
|
+
return ['iframe', Object(_tiptap_core__WEBPACK_IMPORTED_MODULE_0__["mergeAttributes"])(attrs, {
|
|
459
|
+
frameborder: '0',
|
|
460
|
+
allowfullscreen: 'true',
|
|
461
|
+
style: iframeStyle,
|
|
462
|
+
'data-display': display,
|
|
463
|
+
'data-align': align,
|
|
464
|
+
'data-spacing': spacing
|
|
465
|
+
})];
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Block display mode
|
|
396
470
|
// Handle alignment with proper text wrapping
|
|
397
471
|
if (align === 'center') {
|
|
398
472
|
iframeStyle += ' display: block; margin: 1em auto;';
|
|
@@ -401,7 +475,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
401
475
|
} else if (align === 'left') {
|
|
402
476
|
iframeStyle += " float: left; margin: 0 ".concat(spacingValue, " ").concat(spacingValue, " 0; clear: left;");
|
|
403
477
|
} else {
|
|
404
|
-
iframeStyle += " display:
|
|
478
|
+
iframeStyle += " display: block; margin: 0 auto ".concat(spacingValue, ";");
|
|
405
479
|
}
|
|
406
480
|
|
|
407
481
|
// If no caption, return simple iframe
|
|
@@ -410,6 +484,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
410
484
|
frameborder: '0',
|
|
411
485
|
allowfullscreen: 'true',
|
|
412
486
|
style: iframeStyle,
|
|
487
|
+
'data-display': display,
|
|
413
488
|
'data-align': align,
|
|
414
489
|
'data-spacing': spacing
|
|
415
490
|
})];
|
|
@@ -427,7 +502,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
427
502
|
} else if (align === 'left') {
|
|
428
503
|
figureStyle += " float: left; margin: 0 ".concat(spacingValue, " ").concat(spacingValue, " 0; clear: left;");
|
|
429
504
|
} else {
|
|
430
|
-
figureStyle += " margin: 0 ".concat(spacingValue, ";");
|
|
505
|
+
figureStyle += " margin: 0 auto ".concat(spacingValue, ";");
|
|
431
506
|
}
|
|
432
507
|
var captionStyle = 'font-size: 0.875em; color: #6b7280; padding: 0.5em 0; text-align: center; font-style: italic; margin: 0; display: block;';
|
|
433
508
|
|
|
@@ -444,6 +519,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
444
519
|
var children = captionPosition === 'top' ? [captionEl, iframe] : [iframe, captionEl];
|
|
445
520
|
return ['figure', {
|
|
446
521
|
style: figureStyle,
|
|
522
|
+
'data-display': display,
|
|
447
523
|
'data-align': align,
|
|
448
524
|
'data-spacing': spacing
|
|
449
525
|
}].concat(children);
|
|
@@ -453,23 +529,22 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
453
529
|
var HTMLAttributes = _ref2.HTMLAttributes,
|
|
454
530
|
getPos = _ref2.getPos,
|
|
455
531
|
editor = _ref2.editor;
|
|
456
|
-
var container = document.createElement('
|
|
532
|
+
var container = document.createElement('div');
|
|
457
533
|
container.className = 'resizable-video-container';
|
|
458
534
|
container.style.position = 'relative';
|
|
459
|
-
container.style.display = 'inline-block';
|
|
460
535
|
container.style.maxWidth = '100%';
|
|
461
536
|
container.style.verticalAlign = 'top';
|
|
462
537
|
|
|
463
538
|
// Create inner wrapper for proper positioning
|
|
464
|
-
var videoWrapper = document.createElement('
|
|
539
|
+
var videoWrapper = document.createElement('div');
|
|
465
540
|
videoWrapper.className = 'resizable-video-wrapper';
|
|
466
541
|
videoWrapper.style.position = 'relative';
|
|
467
|
-
videoWrapper.style.display = 'inline-block';
|
|
468
542
|
videoWrapper.style.maxWidth = '100%';
|
|
469
543
|
videoWrapper.style.borderRadius = '8px';
|
|
470
544
|
videoWrapper.style.overflow = 'hidden';
|
|
471
545
|
var align = HTMLAttributes.align || 'left';
|
|
472
546
|
var spacing = HTMLAttributes.spacing || 'medium';
|
|
547
|
+
var display = HTMLAttributes.display || 'block';
|
|
473
548
|
|
|
474
549
|
// Determine spacing values
|
|
475
550
|
var spacingMap = {
|
|
@@ -479,23 +554,47 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
479
554
|
};
|
|
480
555
|
var spacingValue = spacingMap[spacing] || spacingMap.medium;
|
|
481
556
|
|
|
482
|
-
// Apply
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
container.style.
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
557
|
+
// Apply display mode styling
|
|
558
|
+
var mainContainer = container;
|
|
559
|
+
if (display === 'inline') {
|
|
560
|
+
container.style.display = 'inline-block';
|
|
561
|
+
videoWrapper.style.display = 'inline-block';
|
|
562
|
+
if (align === 'center') {
|
|
563
|
+
// For inline center, wrap in a block container
|
|
564
|
+
var centerWrapper = document.createElement('div');
|
|
565
|
+
centerWrapper.style.textAlign = 'center';
|
|
566
|
+
centerWrapper.style.display = 'block';
|
|
567
|
+
centerWrapper.style.margin = '0.5em 0';
|
|
568
|
+
centerWrapper.appendChild(container);
|
|
569
|
+
|
|
570
|
+
// Use the center wrapper as the main container
|
|
571
|
+
mainContainer = centerWrapper;
|
|
572
|
+
} else {
|
|
573
|
+
container.style.margin = "0 0.25em";
|
|
574
|
+
}
|
|
497
575
|
} else {
|
|
498
|
-
|
|
576
|
+
// Block display mode
|
|
577
|
+
container.style.display = 'inline-block';
|
|
578
|
+
videoWrapper.style.display = 'inline-block';
|
|
579
|
+
|
|
580
|
+
// Apply proper floating and margins for text wrapping
|
|
581
|
+
if (align === 'center') {
|
|
582
|
+
container.style.display = 'block';
|
|
583
|
+
container.style.textAlign = 'center';
|
|
584
|
+
container.style.margin = '1em auto';
|
|
585
|
+
container.style.float = 'none';
|
|
586
|
+
container.style.clear = 'both';
|
|
587
|
+
} else if (align === 'right') {
|
|
588
|
+
container.style.float = 'right';
|
|
589
|
+
container.style.margin = "0 0 ".concat(spacingValue, " ").concat(spacingValue);
|
|
590
|
+
container.style.clear = 'right';
|
|
591
|
+
} else if (align === 'left') {
|
|
592
|
+
container.style.float = 'left';
|
|
593
|
+
container.style.margin = "0 ".concat(spacingValue, " ").concat(spacingValue, " 0");
|
|
594
|
+
container.style.clear = 'left';
|
|
595
|
+
} else {
|
|
596
|
+
container.style.margin = "0 auto ".concat(spacingValue);
|
|
597
|
+
}
|
|
499
598
|
}
|
|
500
599
|
|
|
501
600
|
// Caption elements
|
|
@@ -686,7 +785,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
686
785
|
}
|
|
687
786
|
});
|
|
688
787
|
return {
|
|
689
|
-
dom:
|
|
788
|
+
dom: mainContainer,
|
|
690
789
|
contentDOM: captionEl,
|
|
691
790
|
update: function update(updatedNode) {
|
|
692
791
|
if (updatedNode.type.name !== 'resizableVideo') {
|
|
@@ -696,9 +795,15 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
696
795
|
var oldAlign = align;
|
|
697
796
|
var oldCaptionPosition = captionPosition;
|
|
698
797
|
var oldSpacing = spacing;
|
|
798
|
+
var oldDisplay = display;
|
|
799
|
+
|
|
800
|
+
// If display mode changed, force re-render
|
|
801
|
+
if (newAttrs.display !== oldDisplay) {
|
|
802
|
+
return false;
|
|
803
|
+
}
|
|
699
804
|
|
|
700
805
|
// Handle spacing changes without re-rendering
|
|
701
|
-
if (newAttrs.spacing !== oldSpacing && newAttrs.align === oldAlign && newAttrs.captionPosition === oldCaptionPosition) {
|
|
806
|
+
if (newAttrs.spacing !== oldSpacing && newAttrs.align === oldAlign && newAttrs.captionPosition === oldCaptionPosition && newAttrs.display === oldDisplay) {
|
|
702
807
|
// Update spacing without re-rendering
|
|
703
808
|
var _spacingMap = {
|
|
704
809
|
small: '0.5em',
|
|
@@ -708,20 +813,22 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
708
813
|
var _spacingValue = _spacingMap[newAttrs.spacing] || _spacingMap.medium;
|
|
709
814
|
|
|
710
815
|
// Update container margins based on alignment and new spacing
|
|
711
|
-
if (newAttrs.
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
816
|
+
if (newAttrs.display === 'block') {
|
|
817
|
+
if (newAttrs.align === 'center') {
|
|
818
|
+
container.style.margin = '1em auto';
|
|
819
|
+
} else if (newAttrs.align === 'right') {
|
|
820
|
+
container.style.margin = "0 0 ".concat(_spacingValue, " ").concat(_spacingValue);
|
|
821
|
+
} else if (newAttrs.align === 'left') {
|
|
822
|
+
container.style.margin = "0 ".concat(_spacingValue, " ").concat(_spacingValue, " 0");
|
|
823
|
+
} else {
|
|
824
|
+
container.style.margin = "0 auto ".concat(_spacingValue);
|
|
825
|
+
}
|
|
719
826
|
}
|
|
720
827
|
return true;
|
|
721
828
|
}
|
|
722
829
|
|
|
723
|
-
// Only force re-render if structural attributes changed (align
|
|
724
|
-
if (newAttrs.align !== oldAlign || newAttrs.captionPosition !== oldCaptionPosition) {
|
|
830
|
+
// Only force re-render if structural attributes changed (align, caption position, or display)
|
|
831
|
+
if (newAttrs.align !== oldAlign || newAttrs.captionPosition !== oldCaptionPosition || newAttrs.display !== oldDisplay) {
|
|
725
832
|
return false;
|
|
726
833
|
}
|
|
727
834
|
|
|
@@ -780,6 +887,22 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
780
887
|
};
|
|
781
888
|
}
|
|
782
889
|
};
|
|
890
|
+
},
|
|
891
|
+
// Add a method to update the node's inline/block behavior
|
|
892
|
+
addStorage: function addStorage() {
|
|
893
|
+
var _this2 = this;
|
|
894
|
+
return {
|
|
895
|
+
updateInlineMode: function updateInlineMode(editor, display) {
|
|
896
|
+
// This will be used by the bubble menu to switch modes
|
|
897
|
+
var isInline = display === 'inline';
|
|
898
|
+
|
|
899
|
+
// Update the extension options
|
|
900
|
+
_this2.options.inline = isInline;
|
|
901
|
+
|
|
902
|
+
// Force re-render by recreating the node
|
|
903
|
+
return true;
|
|
904
|
+
}
|
|
905
|
+
};
|
|
783
906
|
}
|
|
784
907
|
}));
|
|
785
908
|
|
|
@@ -1441,7 +1564,7 @@ function normalizeComponent(
|
|
|
1441
1564
|
|
|
1442
1565
|
"use strict";
|
|
1443
1566
|
|
|
1444
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1a638e0e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/PremiumBblEditor.vue?vue&type=template&id=
|
|
1567
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1a638e0e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/PremiumBblEditor.vue?vue&type=template&id=3d307e70&scoped=true
|
|
1445
1568
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"premium-editor-container",class:[
|
|
1446
1569
|
("theme-" + _vm.theme),
|
|
1447
1570
|
_vm.editorClass
|
|
@@ -1449,7 +1572,7 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
|
|
|
1449
1572
|
var staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_c('strong',[_vm._v("Missing Dependencies:")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"install-command"},[_c('p',[_c('strong',[_vm._v("Quick Fix:")])]),_c('code',[_vm._v("npm install @vue/composition-api @tiptap/core @tiptap/vue-2 @tiptap/starter-kit @tiptap/extension-text-style @tiptap/extension-color @tiptap/extension-highlight @tiptap/extension-underline @tiptap/extension-text-align @tiptap/extension-link @tiptap/extension-font-family @tiptap/extension-code @tiptap/extension-code-block @tiptap/extension-table @tiptap/extension-table-row @tiptap/extension-table-cell @tiptap/extension-table-header @tiptap/extension-task-list @tiptap/extension-task-item @tiptap/extension-placeholder")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"help-links"},[_c('a',{attrs:{"href":"https://github.com/kazi-shahin/vue2-bbl-editor#quick-setup","target":"_blank"}},[_vm._v("📖 Setup Guide")]),_c('a',{attrs:{"href":"https://github.com/kazi-shahin/vue2-bbl-editor/blob/main/TROUBLESHOOTING.md","target":"_blank"}},[_vm._v("🔧 Troubleshooting")])])}]
|
|
1450
1573
|
|
|
1451
1574
|
|
|
1452
|
-
// CONCATENATED MODULE: ./src/components/PremiumBblEditor.vue?vue&type=template&id=
|
|
1575
|
+
// CONCATENATED MODULE: ./src/components/PremiumBblEditor.vue?vue&type=template&id=3d307e70&scoped=true
|
|
1453
1576
|
|
|
1454
1577
|
// EXTERNAL MODULE: external "@tiptap/vue-2"
|
|
1455
1578
|
var vue_2_ = __webpack_require__("9637");
|
|
@@ -2473,8 +2596,8 @@ var tables = __webpack_require__("e6b9");
|
|
|
2473
2596
|
});
|
|
2474
2597
|
// CONCATENATED MODULE: ./src/components/PremiumBblEditor.vue?vue&type=script&lang=js
|
|
2475
2598
|
/* harmony default export */ var components_PremiumBblEditorvue_type_script_lang_js = (PremiumBblEditorvue_type_script_lang_js);
|
|
2476
|
-
// EXTERNAL MODULE: ./src/components/PremiumBblEditor.vue?vue&type=style&index=0&id=
|
|
2477
|
-
var
|
|
2599
|
+
// EXTERNAL MODULE: ./src/components/PremiumBblEditor.vue?vue&type=style&index=0&id=3d307e70&prod&scoped=true&lang=css
|
|
2600
|
+
var PremiumBblEditorvue_type_style_index_0_id_3d307e70_prod_scoped_true_lang_css = __webpack_require__("6f86");
|
|
2478
2601
|
|
|
2479
2602
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2480
2603
|
var componentNormalizer = __webpack_require__("2877");
|
|
@@ -2494,7 +2617,7 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
2494
2617
|
staticRenderFns,
|
|
2495
2618
|
false,
|
|
2496
2619
|
null,
|
|
2497
|
-
"
|
|
2620
|
+
"3d307e70",
|
|
2498
2621
|
null
|
|
2499
2622
|
|
|
2500
2623
|
)
|
|
@@ -2951,6 +3074,13 @@ module.exports = require("@tiptap/extension-table-header");
|
|
|
2951
3074
|
/* unused harmony reexport * */
|
|
2952
3075
|
|
|
2953
3076
|
|
|
3077
|
+
/***/ }),
|
|
3078
|
+
|
|
3079
|
+
/***/ "4fc5":
|
|
3080
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3081
|
+
|
|
3082
|
+
// extracted by mini-css-extract-plugin
|
|
3083
|
+
|
|
2954
3084
|
/***/ }),
|
|
2955
3085
|
|
|
2956
3086
|
/***/ "521c":
|
|
@@ -4556,6 +4686,17 @@ function _toPrimitive(t, r) {
|
|
|
4556
4686
|
}
|
|
4557
4687
|
}));
|
|
4558
4688
|
|
|
4689
|
+
/***/ }),
|
|
4690
|
+
|
|
4691
|
+
/***/ "6f86":
|
|
4692
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4693
|
+
|
|
4694
|
+
"use strict";
|
|
4695
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditor_vue_vue_type_style_index_0_id_3d307e70_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a511");
|
|
4696
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditor_vue_vue_type_style_index_0_id_3d307e70_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditor_vue_vue_type_style_index_0_id_3d307e70_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
4697
|
+
/* unused harmony reexport * */
|
|
4698
|
+
|
|
4699
|
+
|
|
4559
4700
|
/***/ }),
|
|
4560
4701
|
|
|
4561
4702
|
/***/ "71c9":
|
|
@@ -16927,13 +17068,6 @@ module.exports = require("@tiptap/vue-2");
|
|
|
16927
17068
|
|
|
16928
17069
|
/***/ }),
|
|
16929
17070
|
|
|
16930
|
-
/***/ "98d1":
|
|
16931
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
16932
|
-
|
|
16933
|
-
// extracted by mini-css-extract-plugin
|
|
16934
|
-
|
|
16935
|
-
/***/ }),
|
|
16936
|
-
|
|
16937
17071
|
/***/ "9bba":
|
|
16938
17072
|
/***/ (function(module, exports) {
|
|
16939
17073
|
|
|
@@ -18692,6 +18826,13 @@ var SplitCell_component = Object(componentNormalizer["a" /* default */])(
|
|
|
18692
18826
|
|
|
18693
18827
|
/***/ }),
|
|
18694
18828
|
|
|
18829
|
+
/***/ "a511":
|
|
18830
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
18831
|
+
|
|
18832
|
+
// extracted by mini-css-extract-plugin
|
|
18833
|
+
|
|
18834
|
+
/***/ }),
|
|
18835
|
+
|
|
18695
18836
|
/***/ "aa88":
|
|
18696
18837
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
18697
18838
|
|
|
@@ -19568,17 +19709,6 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
19568
19709
|
|
|
19569
19710
|
// extracted by mini-css-extract-plugin
|
|
19570
19711
|
|
|
19571
|
-
/***/ }),
|
|
19572
|
-
|
|
19573
|
-
/***/ "b764":
|
|
19574
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
19575
|
-
|
|
19576
|
-
"use strict";
|
|
19577
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditorOptionsAPI_vue_vue_type_style_index_0_id_410a85e4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("98d1");
|
|
19578
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditorOptionsAPI_vue_vue_type_style_index_0_id_410a85e4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditorOptionsAPI_vue_vue_type_style_index_0_id_410a85e4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
19579
|
-
/* unused harmony reexport * */
|
|
19580
|
-
|
|
19581
|
-
|
|
19582
19712
|
/***/ }),
|
|
19583
19713
|
|
|
19584
19714
|
/***/ "baf3":
|
|
@@ -19934,6 +20064,17 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
19934
20064
|
|
|
19935
20065
|
/* harmony default export */ var LinkModal = __webpack_exports__["a"] = (component.exports);
|
|
19936
20066
|
|
|
20067
|
+
/***/ }),
|
|
20068
|
+
|
|
20069
|
+
/***/ "c4c0":
|
|
20070
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20071
|
+
|
|
20072
|
+
"use strict";
|
|
20073
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditorOptionsAPI_vue_vue_type_style_index_0_id_f08bc882_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4fc5");
|
|
20074
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditorOptionsAPI_vue_vue_type_style_index_0_id_f08bc882_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditorOptionsAPI_vue_vue_type_style_index_0_id_f08bc882_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
20075
|
+
/* unused harmony reexport * */
|
|
20076
|
+
|
|
20077
|
+
|
|
19937
20078
|
/***/ }),
|
|
19938
20079
|
|
|
19939
20080
|
/***/ "c5d0":
|
|
@@ -22309,7 +22450,7 @@ function _typeof(o) {
|
|
|
22309
22450
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
22310
22451
|
}, _typeof(o);
|
|
22311
22452
|
}
|
|
22312
|
-
var _excluded = ["width", "height", "align", "caption", "captionPosition", "spacing"];
|
|
22453
|
+
var _excluded = ["width", "height", "align", "caption", "captionPosition", "spacing", "display"];
|
|
22313
22454
|
function ownKeys(e, r) {
|
|
22314
22455
|
var t = Object.keys(e);
|
|
22315
22456
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -22481,6 +22622,29 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22481
22622
|
spacing: element.getAttribute('data-spacing') || 'medium'
|
|
22482
22623
|
};
|
|
22483
22624
|
}
|
|
22625
|
+
}, {
|
|
22626
|
+
tag: 'div.resizable-image-wrapper',
|
|
22627
|
+
getAttrs: function getAttrs(element) {
|
|
22628
|
+
var img = element.querySelector('img');
|
|
22629
|
+
var figcaption = element.querySelector('figcaption');
|
|
22630
|
+
if (!img) return false;
|
|
22631
|
+
|
|
22632
|
+
// Extract width and height from img style
|
|
22633
|
+
var imgStyle = img.getAttribute('style') || '';
|
|
22634
|
+
var widthMatch = imgStyle.match(/width:\s*(\d+)px/);
|
|
22635
|
+
var heightMatch = imgStyle.match(/height:\s*(\d+)px/);
|
|
22636
|
+
return {
|
|
22637
|
+
src: img.getAttribute('src'),
|
|
22638
|
+
alt: img.getAttribute('alt'),
|
|
22639
|
+
title: img.getAttribute('title'),
|
|
22640
|
+
width: widthMatch ? widthMatch[1] : null,
|
|
22641
|
+
height: heightMatch ? heightMatch[1] : null,
|
|
22642
|
+
align: element.getAttribute('data-align') || 'left',
|
|
22643
|
+
spacing: element.getAttribute('data-spacing') || 'medium',
|
|
22644
|
+
caption: figcaption ? figcaption.textContent : '',
|
|
22645
|
+
captionPosition: figcaption ? 'bottom' : 'none'
|
|
22646
|
+
};
|
|
22647
|
+
}
|
|
22484
22648
|
}, {
|
|
22485
22649
|
tag: 'figure',
|
|
22486
22650
|
getAttrs: function getAttrs(element) {
|
|
@@ -22509,6 +22673,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22509
22673
|
caption = HTMLAttributes.caption,
|
|
22510
22674
|
captionPosition = HTMLAttributes.captionPosition,
|
|
22511
22675
|
spacing = HTMLAttributes.spacing,
|
|
22676
|
+
display = HTMLAttributes.display,
|
|
22512
22677
|
attrs = _objectWithoutProperties(HTMLAttributes, _excluded);
|
|
22513
22678
|
|
|
22514
22679
|
// Determine spacing values
|
|
@@ -22519,6 +22684,42 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22519
22684
|
};
|
|
22520
22685
|
var spacingValue = spacingMap[spacing] || spacingMap.medium;
|
|
22521
22686
|
|
|
22687
|
+
// Build inline styles for image
|
|
22688
|
+
var imgStyle = 'max-width: 100%; height: auto; vertical-align: top;';
|
|
22689
|
+
if (width) {
|
|
22690
|
+
imgStyle += " width: ".concat(width, "px;");
|
|
22691
|
+
}
|
|
22692
|
+
if (height) {
|
|
22693
|
+
imgStyle += " height: ".concat(height, "px;");
|
|
22694
|
+
}
|
|
22695
|
+
|
|
22696
|
+
// Handle display mode
|
|
22697
|
+
if (display === 'inline') {
|
|
22698
|
+
// Inline display - image flows with text
|
|
22699
|
+
imgStyle += ' display: inline-block;';
|
|
22700
|
+
if (align === 'center') {
|
|
22701
|
+
// For inline center, we still need a wrapper
|
|
22702
|
+
return ['div', {
|
|
22703
|
+
style: 'text-align: center; display: block; margin: 0.5em 0;',
|
|
22704
|
+
'data-display': display,
|
|
22705
|
+
'data-align': align,
|
|
22706
|
+
'data-spacing': spacing,
|
|
22707
|
+
class: 'resizable-image-wrapper'
|
|
22708
|
+
}, ['img', Object(_tiptap_core__WEBPACK_IMPORTED_MODULE_0__["mergeAttributes"])(attrs, {
|
|
22709
|
+
style: imgStyle
|
|
22710
|
+
})]];
|
|
22711
|
+
} else {
|
|
22712
|
+
// Simple inline image
|
|
22713
|
+
return ['img', Object(_tiptap_core__WEBPACK_IMPORTED_MODULE_0__["mergeAttributes"])(attrs, {
|
|
22714
|
+
style: imgStyle,
|
|
22715
|
+
'data-display': display,
|
|
22716
|
+
'data-align': align,
|
|
22717
|
+
'data-spacing': spacing
|
|
22718
|
+
})];
|
|
22719
|
+
}
|
|
22720
|
+
}
|
|
22721
|
+
|
|
22722
|
+
// Block display mode
|
|
22522
22723
|
// Create a wrapper div that allows text wrapping
|
|
22523
22724
|
var wrapperStyle = 'display: inline-block; max-width: 100%; vertical-align: top;';
|
|
22524
22725
|
|
|
@@ -22530,11 +22731,11 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22530
22731
|
} else if (align === 'left') {
|
|
22531
22732
|
wrapperStyle += " float: left; margin: 0 ".concat(spacingValue, " ").concat(spacingValue, " 0; clear: left;");
|
|
22532
22733
|
} else {
|
|
22533
|
-
wrapperStyle += " margin: 0 ".concat(spacingValue, ";");
|
|
22734
|
+
wrapperStyle += " margin: 0 auto ".concat(spacingValue, ";");
|
|
22534
22735
|
}
|
|
22535
22736
|
|
|
22536
|
-
//
|
|
22537
|
-
|
|
22737
|
+
// Reset image style for wrapper context
|
|
22738
|
+
imgStyle = 'max-width: 100%; height: auto; display: block; margin: 0;';
|
|
22538
22739
|
if (width) {
|
|
22539
22740
|
imgStyle += " width: ".concat(width, "px;");
|
|
22540
22741
|
}
|
|
@@ -22546,6 +22747,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22546
22747
|
if (!caption || captionPosition === 'none') {
|
|
22547
22748
|
return ['div', {
|
|
22548
22749
|
style: wrapperStyle,
|
|
22750
|
+
'data-display': display,
|
|
22549
22751
|
'data-align': align,
|
|
22550
22752
|
'data-spacing': spacing,
|
|
22551
22753
|
class: 'resizable-image-wrapper'
|
|
@@ -22565,6 +22767,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22565
22767
|
var children = captionPosition === 'top' ? [captionEl, img] : [img, captionEl];
|
|
22566
22768
|
return ['div', {
|
|
22567
22769
|
style: wrapperStyle,
|
|
22770
|
+
'data-display': display,
|
|
22568
22771
|
'data-align': align,
|
|
22569
22772
|
'data-spacing': spacing,
|
|
22570
22773
|
class: 'resizable-image-wrapper'
|
|
@@ -22580,7 +22783,6 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22580
22783
|
var container = document.createElement('div');
|
|
22581
22784
|
container.className = 'resizable-image-container';
|
|
22582
22785
|
container.style.position = 'relative';
|
|
22583
|
-
container.style.display = 'inline-block';
|
|
22584
22786
|
container.style.maxWidth = '100%';
|
|
22585
22787
|
container.style.verticalAlign = 'top';
|
|
22586
22788
|
|
|
@@ -22588,10 +22790,10 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22588
22790
|
var imageWrapper = document.createElement('div');
|
|
22589
22791
|
imageWrapper.className = 'resizable-image-wrapper';
|
|
22590
22792
|
imageWrapper.style.position = 'relative';
|
|
22591
|
-
imageWrapper.style.display = 'inline-block';
|
|
22592
22793
|
imageWrapper.style.maxWidth = '100%';
|
|
22593
22794
|
var align = HTMLAttributes.align || 'left';
|
|
22594
22795
|
var spacing = HTMLAttributes.spacing || 'medium';
|
|
22796
|
+
var display = HTMLAttributes.display || 'block';
|
|
22595
22797
|
|
|
22596
22798
|
// Determine spacing values
|
|
22597
22799
|
var spacingMap = {
|
|
@@ -22601,23 +22803,47 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22601
22803
|
};
|
|
22602
22804
|
var spacingValue = spacingMap[spacing] || spacingMap.medium;
|
|
22603
22805
|
|
|
22604
|
-
// Apply
|
|
22605
|
-
|
|
22606
|
-
|
|
22607
|
-
container.style.
|
|
22608
|
-
|
|
22609
|
-
|
|
22610
|
-
|
|
22611
|
-
|
|
22612
|
-
|
|
22613
|
-
|
|
22614
|
-
|
|
22615
|
-
|
|
22616
|
-
|
|
22617
|
-
|
|
22618
|
-
|
|
22806
|
+
// Apply display mode styling
|
|
22807
|
+
var mainContainer = container;
|
|
22808
|
+
if (display === 'inline') {
|
|
22809
|
+
container.style.display = 'inline-block';
|
|
22810
|
+
imageWrapper.style.display = 'inline-block';
|
|
22811
|
+
if (align === 'center') {
|
|
22812
|
+
// For inline center, wrap in a block container
|
|
22813
|
+
var centerWrapper = document.createElement('div');
|
|
22814
|
+
centerWrapper.style.textAlign = 'center';
|
|
22815
|
+
centerWrapper.style.display = 'block';
|
|
22816
|
+
centerWrapper.style.margin = '0.5em 0';
|
|
22817
|
+
centerWrapper.appendChild(container);
|
|
22818
|
+
|
|
22819
|
+
// Use the center wrapper as the main container
|
|
22820
|
+
mainContainer = centerWrapper;
|
|
22821
|
+
} else {
|
|
22822
|
+
container.style.margin = "0 0.25em";
|
|
22823
|
+
}
|
|
22619
22824
|
} else {
|
|
22620
|
-
|
|
22825
|
+
// Block display mode
|
|
22826
|
+
container.style.display = 'inline-block';
|
|
22827
|
+
imageWrapper.style.display = 'inline-block';
|
|
22828
|
+
|
|
22829
|
+
// Apply proper floating and margins for text wrapping
|
|
22830
|
+
if (align === 'center') {
|
|
22831
|
+
container.style.display = 'block';
|
|
22832
|
+
container.style.textAlign = 'center';
|
|
22833
|
+
container.style.margin = '1em auto';
|
|
22834
|
+
container.style.float = 'none';
|
|
22835
|
+
container.style.clear = 'both';
|
|
22836
|
+
} else if (align === 'right') {
|
|
22837
|
+
container.style.float = 'right';
|
|
22838
|
+
container.style.margin = "0 0 0 ".concat(spacingValue);
|
|
22839
|
+
container.style.clear = 'right';
|
|
22840
|
+
} else if (align === 'left') {
|
|
22841
|
+
container.style.float = 'left';
|
|
22842
|
+
container.style.margin = "0 ".concat(spacingValue, " 0 0");
|
|
22843
|
+
container.style.clear = 'left';
|
|
22844
|
+
} else {
|
|
22845
|
+
container.style.margin = "0 auto ".concat(spacingValue);
|
|
22846
|
+
}
|
|
22621
22847
|
}
|
|
22622
22848
|
|
|
22623
22849
|
// Caption elements
|
|
@@ -22809,7 +23035,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22809
23035
|
}
|
|
22810
23036
|
});
|
|
22811
23037
|
return {
|
|
22812
|
-
dom:
|
|
23038
|
+
dom: mainContainer,
|
|
22813
23039
|
contentDOM: captionEl,
|
|
22814
23040
|
update: function update(updatedNode) {
|
|
22815
23041
|
if (updatedNode.type.name !== 'resizableImage') {
|
|
@@ -22819,9 +23045,15 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22819
23045
|
var oldAlign = align;
|
|
22820
23046
|
var oldCaptionPosition = captionPosition;
|
|
22821
23047
|
var oldSpacing = spacing;
|
|
23048
|
+
var oldDisplay = display;
|
|
23049
|
+
|
|
23050
|
+
// If display mode changed, force re-render
|
|
23051
|
+
if (newAttrs.display !== oldDisplay) {
|
|
23052
|
+
return false;
|
|
23053
|
+
}
|
|
22822
23054
|
|
|
22823
23055
|
// Handle spacing changes without re-rendering
|
|
22824
|
-
if (newAttrs.spacing !== oldSpacing && newAttrs.align === oldAlign && newAttrs.captionPosition === oldCaptionPosition) {
|
|
23056
|
+
if (newAttrs.spacing !== oldSpacing && newAttrs.align === oldAlign && newAttrs.captionPosition === oldCaptionPosition && newAttrs.display === oldDisplay) {
|
|
22825
23057
|
// Update spacing without re-rendering
|
|
22826
23058
|
var _spacingMap = {
|
|
22827
23059
|
small: '0.5em',
|
|
@@ -22831,20 +23063,22 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22831
23063
|
var _spacingValue = _spacingMap[newAttrs.spacing] || _spacingMap.medium;
|
|
22832
23064
|
|
|
22833
23065
|
// Update container margins based on alignment and new spacing
|
|
22834
|
-
if (newAttrs.
|
|
22835
|
-
|
|
22836
|
-
|
|
22837
|
-
|
|
22838
|
-
|
|
22839
|
-
|
|
22840
|
-
|
|
22841
|
-
|
|
23066
|
+
if (newAttrs.display === 'block') {
|
|
23067
|
+
if (newAttrs.align === 'center') {
|
|
23068
|
+
container.style.margin = '1em auto';
|
|
23069
|
+
} else if (newAttrs.align === 'right') {
|
|
23070
|
+
container.style.margin = "0 0 ".concat(_spacingValue, " ").concat(_spacingValue);
|
|
23071
|
+
} else if (newAttrs.align === 'left') {
|
|
23072
|
+
container.style.margin = "0 ".concat(_spacingValue, " ").concat(_spacingValue, " 0");
|
|
23073
|
+
} else {
|
|
23074
|
+
container.style.margin = "0 auto ".concat(_spacingValue);
|
|
23075
|
+
}
|
|
22842
23076
|
}
|
|
22843
23077
|
return true;
|
|
22844
23078
|
}
|
|
22845
23079
|
|
|
22846
|
-
// Only force re-render if structural attributes changed (align
|
|
22847
|
-
if (newAttrs.align !== oldAlign || newAttrs.captionPosition !== oldCaptionPosition) {
|
|
23080
|
+
// Only force re-render if structural attributes changed (align, caption position, or display)
|
|
23081
|
+
if (newAttrs.align !== oldAlign || newAttrs.captionPosition !== oldCaptionPosition || newAttrs.display !== oldDisplay) {
|
|
22848
23082
|
return false;
|
|
22849
23083
|
}
|
|
22850
23084
|
|
|
@@ -22896,6 +23130,22 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
22896
23130
|
};
|
|
22897
23131
|
}
|
|
22898
23132
|
};
|
|
23133
|
+
},
|
|
23134
|
+
// Add a method to update the node's inline/block behavior
|
|
23135
|
+
addStorage: function addStorage() {
|
|
23136
|
+
var _this2 = this;
|
|
23137
|
+
return {
|
|
23138
|
+
updateInlineMode: function updateInlineMode(editor, display) {
|
|
23139
|
+
// This will be used by the bubble menu to switch modes
|
|
23140
|
+
var isInline = display === 'inline';
|
|
23141
|
+
|
|
23142
|
+
// Update the extension options
|
|
23143
|
+
_this2.options.inline = isInline;
|
|
23144
|
+
|
|
23145
|
+
// Force re-render by recreating the node
|
|
23146
|
+
return true;
|
|
23147
|
+
}
|
|
23148
|
+
};
|
|
22899
23149
|
}
|
|
22900
23150
|
}));
|
|
22901
23151
|
|
|
@@ -23622,24 +23872,6 @@ var CodeBlock = _tiptap_core__WEBPACK_IMPORTED_MODULE_0__["Node"].create({
|
|
|
23622
23872
|
});
|
|
23623
23873
|
|
|
23624
23874
|
|
|
23625
|
-
/***/ }),
|
|
23626
|
-
|
|
23627
|
-
/***/ "f6aa":
|
|
23628
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
23629
|
-
|
|
23630
|
-
// extracted by mini-css-extract-plugin
|
|
23631
|
-
|
|
23632
|
-
/***/ }),
|
|
23633
|
-
|
|
23634
|
-
/***/ "f891":
|
|
23635
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
23636
|
-
|
|
23637
|
-
"use strict";
|
|
23638
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditor_vue_vue_type_style_index_0_id_36924141_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f6aa");
|
|
23639
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditor_vue_vue_type_style_index_0_id_36924141_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PremiumBblEditor_vue_vue_type_style_index_0_id_36924141_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
23640
|
-
/* unused harmony reexport * */
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
23875
|
/***/ }),
|
|
23644
23876
|
|
|
23645
23877
|
/***/ "f948":
|
|
@@ -23698,7 +23930,7 @@ if (typeof window !== 'undefined') {
|
|
|
23698
23930
|
// EXTERNAL MODULE: ./src/components/PremiumBblEditor.vue + 4 modules
|
|
23699
23931
|
var PremiumBblEditor = __webpack_require__("2cce");
|
|
23700
23932
|
|
|
23701
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1a638e0e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=template&id=
|
|
23933
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1a638e0e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=template&id=f08bc882&scoped=true
|
|
23702
23934
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"premium-editor-container",class:[
|
|
23703
23935
|
("theme-" + _vm.theme),
|
|
23704
23936
|
_vm.editorClass
|
|
@@ -23706,7 +23938,7 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
|
|
|
23706
23938
|
var staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_c('strong',[_vm._v("Missing Dependencies:")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"install-command"},[_c('p',[_c('strong',[_vm._v("Quick Fix:")])]),_c('code',[_vm._v("npm install @vue/composition-api @tiptap/core @tiptap/vue-2 @tiptap/starter-kit @tiptap/extension-text-style @tiptap/extension-color @tiptap/extension-highlight @tiptap/extension-underline @tiptap/extension-text-align @tiptap/extension-link @tiptap/extension-font-family @tiptap/extension-code @tiptap/extension-code-block @tiptap/extension-table @tiptap/extension-table-row @tiptap/extension-table-cell @tiptap/extension-table-header @tiptap/extension-task-list @tiptap/extension-task-item @tiptap/extension-placeholder")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"help-links"},[_c('a',{attrs:{"href":"https://github.com/kazi-shahin/vue2-bbl-editor#quick-setup","target":"_blank"}},[_vm._v("📖 Setup Guide")]),_c('a',{attrs:{"href":"https://github.com/kazi-shahin/vue2-bbl-editor/blob/main/TROUBLESHOOTING.md","target":"_blank"}},[_vm._v("🔧 Troubleshooting")])])}]
|
|
23707
23939
|
|
|
23708
23940
|
|
|
23709
|
-
// CONCATENATED MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=template&id=
|
|
23941
|
+
// CONCATENATED MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=template&id=f08bc882&scoped=true
|
|
23710
23942
|
|
|
23711
23943
|
// EXTERNAL MODULE: external "@tiptap/vue-2"
|
|
23712
23944
|
var vue_2_ = __webpack_require__("9637");
|
|
@@ -25435,8 +25667,8 @@ var LineHeight = core_["Extension"].create({
|
|
|
25435
25667
|
});
|
|
25436
25668
|
// CONCATENATED MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=script&lang=js
|
|
25437
25669
|
/* harmony default export */ var components_PremiumBblEditorOptionsAPIvue_type_script_lang_js = (PremiumBblEditorOptionsAPIvue_type_script_lang_js);
|
|
25438
|
-
// EXTERNAL MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=style&index=0&id=
|
|
25439
|
-
var
|
|
25670
|
+
// EXTERNAL MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=style&index=0&id=f08bc882&prod&scoped=true&lang=css
|
|
25671
|
+
var PremiumBblEditorOptionsAPIvue_type_style_index_0_id_f08bc882_prod_scoped_true_lang_css = __webpack_require__("c4c0");
|
|
25440
25672
|
|
|
25441
25673
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
25442
25674
|
var componentNormalizer = __webpack_require__("2877");
|
|
@@ -25456,7 +25688,7 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
25456
25688
|
staticRenderFns,
|
|
25457
25689
|
false,
|
|
25458
25690
|
null,
|
|
25459
|
-
"
|
|
25691
|
+
"f08bc882",
|
|
25460
25692
|
null
|
|
25461
25693
|
|
|
25462
25694
|
)
|