vue2-bbl-editor 1.5.0 → 1.5.2

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.
@@ -370,9 +370,10 @@ function _objectWithoutPropertiesLoose(r, e) {
370
370
  var heightMatch = style.match(/height:\s*(\d+)px/);
371
371
  return {
372
372
  src: element.getAttribute('src'),
373
- width: widthMatch ? parseInt(widthMatch[1]) : element.getAttribute('width') || 560,
374
- height: heightMatch ? parseInt(heightMatch[1]) : element.getAttribute('height') || 315,
373
+ width: widthMatch ? parseInt(widthMatch[1]) : element.getAttribute('width') ? parseInt(element.getAttribute('width')) : 560,
374
+ height: heightMatch ? parseInt(heightMatch[1]) : element.getAttribute('height') ? parseInt(element.getAttribute('height')) : 315,
375
375
  align: element.getAttribute('data-align') || 'left',
376
+ display: element.getAttribute('data-display') || 'block',
376
377
  spacing: element.getAttribute('data-spacing') || 'medium',
377
378
  controls: element.getAttribute('controls') !== 'false',
378
379
  nocookie: element.getAttribute('nocookie') === 'true'
@@ -387,9 +388,10 @@ function _objectWithoutPropertiesLoose(r, e) {
387
388
  var heightMatch = style.match(/height:\s*(\d+)px/);
388
389
  return {
389
390
  src: element.getAttribute('src'),
390
- width: widthMatch ? parseInt(widthMatch[1]) : element.getAttribute('width') || 560,
391
- height: heightMatch ? parseInt(heightMatch[1]) : element.getAttribute('height') || 315,
391
+ width: widthMatch ? parseInt(widthMatch[1]) : element.getAttribute('width') ? parseInt(element.getAttribute('width')) : 560,
392
+ height: heightMatch ? parseInt(heightMatch[1]) : element.getAttribute('height') ? parseInt(element.getAttribute('height')) : 315,
392
393
  align: element.getAttribute('data-align') || 'left',
394
+ display: element.getAttribute('data-display') || 'block',
393
395
  spacing: element.getAttribute('data-spacing') || 'medium',
394
396
  controls: element.getAttribute('controls') !== 'false',
395
397
  nocookie: element.getAttribute('nocookie') === 'true'
@@ -408,9 +410,10 @@ function _objectWithoutPropertiesLoose(r, e) {
408
410
  var heightMatch = style.match(/height:\s*(\d+)px/);
409
411
  return {
410
412
  src: iframe.getAttribute('src'),
411
- width: widthMatch ? parseInt(widthMatch[1]) : iframe.getAttribute('width') || 560,
412
- height: heightMatch ? parseInt(heightMatch[1]) : iframe.getAttribute('height') || 315,
413
+ width: widthMatch ? parseInt(widthMatch[1]) : iframe.getAttribute('width') ? parseInt(iframe.getAttribute('width')) : 560,
414
+ height: heightMatch ? parseInt(heightMatch[1]) : iframe.getAttribute('height') ? parseInt(iframe.getAttribute('height')) : 315,
413
415
  align: element.getAttribute('data-align') || iframe.getAttribute('data-align') || 'left',
416
+ display: element.getAttribute('data-display') || iframe.getAttribute('data-display') || 'block',
414
417
  spacing: element.getAttribute('data-spacing') || iframe.getAttribute('data-spacing') || 'medium',
415
418
  controls: iframe.getAttribute('controls') !== 'false',
416
419
  nocookie: iframe.getAttribute('nocookie') === 'true',
@@ -699,6 +702,14 @@ function _objectWithoutPropertiesLoose(r, e) {
699
702
  iframe.style.margin = '0';
700
703
  iframe.style.verticalAlign = 'top';
701
704
 
705
+ // Apply width and height from attributes to style for proper rendering
706
+ if (HTMLAttributes.width) {
707
+ iframe.style.width = HTMLAttributes.width + 'px';
708
+ }
709
+ if (HTMLAttributes.height) {
710
+ iframe.style.height = HTMLAttributes.height + 'px';
711
+ }
712
+
702
713
  // Add resize handle
703
714
  var resizeHandle = document.createElement('div');
704
715
  resizeHandle.className = 'video-resize-handle';
@@ -1547,7 +1558,7 @@ function normalizeComponent(
1547
1558
 
1548
1559
  "use strict";
1549
1560
 
1550
- // 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
1561
+ // 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=645beb94&scoped=true
1551
1562
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"premium-editor-container",class:[
1552
1563
  ("theme-" + _vm.theme),
1553
1564
  _vm.editorClass
@@ -1555,7 +1566,7 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
1555
1566
  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")])])}]
1556
1567
 
1557
1568
 
1558
- // CONCATENATED MODULE: ./src/components/PremiumBblEditor.vue?vue&type=template&id=3d307e70&scoped=true
1569
+ // CONCATENATED MODULE: ./src/components/PremiumBblEditor.vue?vue&type=template&id=645beb94&scoped=true
1559
1570
 
1560
1571
  // EXTERNAL MODULE: external "@tiptap/vue-2"
1561
1572
  var vue_2_ = __webpack_require__("9637");
@@ -2579,8 +2590,8 @@ var tables = __webpack_require__("e6b9");
2579
2590
  });
2580
2591
  // CONCATENATED MODULE: ./src/components/PremiumBblEditor.vue?vue&type=script&lang=js
2581
2592
  /* harmony default export */ var components_PremiumBblEditorvue_type_script_lang_js = (PremiumBblEditorvue_type_script_lang_js);
2582
- // EXTERNAL MODULE: ./src/components/PremiumBblEditor.vue?vue&type=style&index=0&id=3d307e70&prod&scoped=true&lang=css
2583
- var PremiumBblEditorvue_type_style_index_0_id_3d307e70_prod_scoped_true_lang_css = __webpack_require__("6f86");
2593
+ // EXTERNAL MODULE: ./src/components/PremiumBblEditor.vue?vue&type=style&index=0&id=645beb94&prod&scoped=true&lang=css
2594
+ var PremiumBblEditorvue_type_style_index_0_id_645beb94_prod_scoped_true_lang_css = __webpack_require__("ef69");
2584
2595
 
2585
2596
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2586
2597
  var componentNormalizer = __webpack_require__("2877");
@@ -2600,7 +2611,7 @@ var component = Object(componentNormalizer["a" /* default */])(
2600
2611
  staticRenderFns,
2601
2612
  false,
2602
2613
  null,
2603
- "3d307e70",
2614
+ "645beb94",
2604
2615
  null
2605
2616
 
2606
2617
  )
@@ -3052,10 +3063,14 @@ module.exports = require("@tiptap/extension-table-header");
3052
3063
 
3053
3064
  /***/ }),
3054
3065
 
3055
- /***/ "4fc5":
3056
- /***/ (function(module, exports, __webpack_require__) {
3066
+ /***/ "4ddd":
3067
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3068
+
3069
+ "use strict";
3070
+ /* 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_cc6a3522_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("785c");
3071
+ /* 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_cc6a3522_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_cc6a3522_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
3072
+ /* unused harmony reexport * */
3057
3073
 
3058
- // extracted by mini-css-extract-plugin
3059
3074
 
3060
3075
  /***/ }),
3061
3076
 
@@ -8936,17 +8951,6 @@ function _renderSpec(doc, structure, xmlNS, blockArraysIn) {
8936
8951
  }
8937
8952
 
8938
8953
 
8939
- /***/ }),
8940
-
8941
- /***/ "6f86":
8942
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
8943
-
8944
- "use strict";
8945
- /* 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");
8946
- /* 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__);
8947
- /* unused harmony reexport * */
8948
-
8949
-
8950
8954
  /***/ }),
8951
8955
 
8952
8956
  /***/ "6ffb":
@@ -10303,6 +10307,13 @@ module.exports = require("@tiptap/extension-font-family");
10303
10307
 
10304
10308
  /***/ }),
10305
10309
 
10310
+ /***/ "785c":
10311
+ /***/ (function(module, exports, __webpack_require__) {
10312
+
10313
+ // extracted by mini-css-extract-plugin
10314
+
10315
+ /***/ }),
10316
+
10306
10317
  /***/ "7a7e":
10307
10318
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10308
10319
 
@@ -12834,16 +12845,20 @@ var state_dist = __webpack_require__("7c31");
12834
12845
  var shouldInsertNodeAtEnd = plugin.getState(newState);
12835
12846
  var endPosition = doc.content.size;
12836
12847
  var type = newState.schema.nodes[_this.options.node];
12837
- if (!shouldInsertNodeAtEnd) {
12848
+ if (!shouldInsertNodeAtEnd || !type) {
12838
12849
  return;
12839
12850
  }
12840
12851
 
12841
12852
  // Check if we need to add a trailing paragraph
12842
12853
  var lastNode = doc.lastChild;
12843
12854
  if (!lastNode || _this.options.blockElements.includes(lastNode.type.name)) {
12844
- return tr.insert(endPosition, type.create());
12855
+ // Ensure the insert position is valid
12856
+ var safeEndPosition = Math.min(endPosition, doc.content.size);
12857
+ if (safeEndPosition >= 0) {
12858
+ return tr.insert(safeEndPosition, type.create());
12859
+ }
12845
12860
  }
12846
- return tr.insert(endPosition, type.create());
12861
+ return null;
12847
12862
  },
12848
12863
  state: {
12849
12864
  init: function init(_, state) {
@@ -12865,6 +12880,7 @@ var state_dist = __webpack_require__("7c31");
12865
12880
  key: new state_dist["b" /* PluginKey */]('cursorPositioning'),
12866
12881
  appendTransaction: function appendTransaction(transactions, oldState, newState) {
12867
12882
  var tr = null;
12883
+ var docSize = newState.doc.content.size;
12868
12884
 
12869
12885
  // Check if any transaction inserted a block element
12870
12886
  transactions.forEach(function (transaction) {
@@ -12874,32 +12890,53 @@ var state_dist = __webpack_require__("7c31");
12874
12890
  var slice = step.slice;
12875
12891
  if (slice && slice.content) {
12876
12892
  slice.content.forEach(function (node) {
12893
+ var _node$attrs;
12877
12894
  // If a block display element was inserted
12878
12895
  var isBlockElement = _this.options.blockElements.includes(node.type.name);
12879
- var isBlockDisplay = node.attrs.display === 'block' || node.type.name === 'table';
12896
+ var isBlockDisplay = ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.display) === 'block' || node.type.name === 'table';
12880
12897
  if (isBlockElement && isBlockDisplay) {
12881
12898
  var insertPos = step.to || step.from;
12882
- var nextPos = insertPos + node.nodeSize;
12899
+ var nextPos = Math.min(insertPos + node.nodeSize, docSize);
12883
12900
 
12884
- // Check if there's content after the inserted element
12885
- if (nextPos >= newState.doc.content.size) {
12886
- // Add a paragraph after the block element
12887
- if (!tr) {
12888
- tr = newState.tr;
12889
- }
12890
- var paragraphType = newState.schema.nodes.paragraph;
12891
- tr.insert(nextPos, paragraphType.create());
12892
-
12893
- // Position cursor in the new paragraph
12894
- tr.setSelection(newState.selection.constructor.near(tr.doc.resolve(nextPos + 1)));
12895
- } else {
12896
- // Position cursor after the inserted element
12897
- var nextNode = newState.doc.nodeAt(nextPos);
12898
- if (nextNode && nextNode.type.name === 'paragraph') {
12901
+ // Ensure positions are within valid range
12902
+ if (insertPos >= 0 && insertPos <= docSize && nextPos >= 0 && nextPos <= docSize) {
12903
+ // Check if there's content after the inserted element
12904
+ if (nextPos >= docSize) {
12905
+ // Add a paragraph after the block element
12899
12906
  if (!tr) {
12900
12907
  tr = newState.tr;
12901
12908
  }
12902
- tr.setSelection(newState.selection.constructor.near(tr.doc.resolve(nextPos + 1)));
12909
+ var paragraphType = newState.schema.nodes.paragraph;
12910
+ var safeInsertPos = Math.min(nextPos, tr.doc.content.size);
12911
+ tr.insert(safeInsertPos, paragraphType.create());
12912
+
12913
+ // Position cursor in the new paragraph safely
12914
+ var cursorPos = Math.min(safeInsertPos + 1, tr.doc.content.size);
12915
+ if (cursorPos > 0 && cursorPos <= tr.doc.content.size) {
12916
+ try {
12917
+ tr.setSelection(newState.selection.constructor.near(tr.doc.resolve(cursorPos)));
12918
+ } catch (e) {
12919
+ // Fallback to end of document if position is invalid
12920
+ tr.setSelection(newState.selection.constructor.atEnd(tr.doc));
12921
+ }
12922
+ }
12923
+ } else {
12924
+ // Position cursor after the inserted element
12925
+ var nextNode = newState.doc.nodeAt(nextPos);
12926
+ if (nextNode && nextNode.type.name === 'paragraph') {
12927
+ if (!tr) {
12928
+ tr = newState.tr;
12929
+ }
12930
+ var _cursorPos = Math.min(nextPos + 1, newState.doc.content.size);
12931
+ if (_cursorPos > 0 && _cursorPos <= newState.doc.content.size) {
12932
+ try {
12933
+ tr.setSelection(newState.selection.constructor.near(tr.doc.resolve(_cursorPos)));
12934
+ } catch (e) {
12935
+ // Fallback to end of document if position is invalid
12936
+ tr.setSelection(newState.selection.constructor.atEnd(tr.doc));
12937
+ }
12938
+ }
12939
+ }
12903
12940
  }
12904
12941
  }
12905
12942
  }
@@ -12935,15 +12972,29 @@ var state_dist = __webpack_require__("7c31");
12935
12972
  var tr = state.tr,
12936
12973
  selection = state.selection;
12937
12974
  var pos = selection.to;
12938
- var nextNode = tr.doc.nodeAt(pos);
12939
- if (!nextNode || _this2.options.blockElements.includes(nextNode.type.name)) {
12940
- var paragraphType = state.schema.nodes.paragraph;
12941
- tr.insert(pos, paragraphType.create());
12942
-
12943
- // Position cursor in the new paragraph
12944
- var newPos = pos + 1;
12945
- tr.setSelection(selection.constructor.near(tr.doc.resolve(newPos)));
12946
- dispatch(tr);
12975
+ var docSize = tr.doc.content.size;
12976
+
12977
+ // Ensure position is within valid range
12978
+ if (pos >= 0 && pos <= docSize) {
12979
+ var nextNode = tr.doc.nodeAt(pos);
12980
+ if (!nextNode || _this2.options.blockElements.includes(nextNode.type.name)) {
12981
+ var paragraphType = state.schema.nodes.paragraph;
12982
+ var safeInsertPos = Math.min(pos, docSize);
12983
+ tr.insert(safeInsertPos, paragraphType.create());
12984
+
12985
+ // Position cursor in the new paragraph safely
12986
+ var newPos = Math.min(safeInsertPos + 1, tr.doc.content.size);
12987
+ if (newPos > 0 && newPos <= tr.doc.content.size) {
12988
+ try {
12989
+ tr.setSelection(selection.constructor.near(tr.doc.resolve(newPos)));
12990
+ dispatch(tr);
12991
+ } catch (e) {
12992
+ // Fallback to end of document if position is invalid
12993
+ tr.setSelection(selection.constructor.atEnd(tr.doc));
12994
+ dispatch(tr);
12995
+ }
12996
+ }
12997
+ }
12947
12998
  }
12948
12999
  }
12949
13000
  return result;
@@ -12962,6 +13013,11 @@ var state_dist = __webpack_require__("7c31");
12962
13013
  var pos = selection.to;
12963
13014
  var endPos = doc.content.size;
12964
13015
 
13016
+ // Ensure position is within valid range
13017
+ if (pos < 0 || pos > endPos) {
13018
+ return false;
13019
+ }
13020
+
12965
13021
  // If we're at the end of the document
12966
13022
  if (pos >= endPos - 1) {
12967
13023
  var lastNode = doc.lastChild;
@@ -12969,7 +13025,8 @@ var state_dist = __webpack_require__("7c31");
12969
13025
  // If the last node is a block element, add a paragraph
12970
13026
  if (lastNode && _this2.options.blockElements.includes(lastNode.type.name)) {
12971
13027
  var paragraphType = state.schema.nodes.paragraph;
12972
- tr.insert(endPos, paragraphType.create());
13028
+ var safeInsertPos = Math.min(endPos, doc.content.size);
13029
+ tr.insert(safeInsertPos, paragraphType.create());
12973
13030
  if (dispatch) {
12974
13031
  dispatch(tr);
12975
13032
  }
@@ -23131,7 +23188,7 @@ var SplitCell_component = Object(componentNormalizer["a" /* default */])(
23131
23188
 
23132
23189
  /***/ }),
23133
23190
 
23134
- /***/ "a511":
23191
+ /***/ "a99c":
23135
23192
  /***/ (function(module, exports, __webpack_require__) {
23136
23193
 
23137
23194
  // extracted by mini-css-extract-plugin
@@ -26987,17 +27044,6 @@ var component = Object(componentNormalizer["a" /* default */])(
26987
27044
 
26988
27045
  /* harmony default export */ var LinkModal = __webpack_exports__["a"] = (component.exports);
26989
27046
 
26990
- /***/ }),
26991
-
26992
- /***/ "c4c0":
26993
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
26994
-
26995
- "use strict";
26996
- /* 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");
26997
- /* 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__);
26998
- /* unused harmony reexport * */
26999
-
27000
-
27001
27047
  /***/ }),
27002
27048
 
27003
27049
  /***/ "c5d0":
@@ -29542,13 +29588,18 @@ function _objectWithoutPropertiesLoose(r, e) {
29542
29588
  return [{
29543
29589
  tag: 'img[src]',
29544
29590
  getAttrs: function getAttrs(element) {
29591
+ // Extract width and height from style if available, fallback to attributes
29592
+ var style = element.getAttribute('style') || '';
29593
+ var widthMatch = style.match(/width:\s*(\d+)px/);
29594
+ var heightMatch = style.match(/height:\s*(\d+)px/);
29545
29595
  return {
29546
29596
  src: element.getAttribute('src'),
29547
29597
  alt: element.getAttribute('alt'),
29548
29598
  title: element.getAttribute('title'),
29549
- width: element.getAttribute('width'),
29550
- height: element.getAttribute('height'),
29599
+ width: widthMatch ? parseInt(widthMatch[1]) : element.getAttribute('width') ? parseInt(element.getAttribute('width')) : null,
29600
+ height: heightMatch ? parseInt(heightMatch[1]) : element.getAttribute('height') ? parseInt(element.getAttribute('height')) : null,
29551
29601
  align: element.getAttribute('data-align') || 'left',
29602
+ display: element.getAttribute('data-display') || 'block',
29552
29603
  spacing: element.getAttribute('data-spacing') || 'medium'
29553
29604
  };
29554
29605
  }
@@ -29567,9 +29618,34 @@ function _objectWithoutPropertiesLoose(r, e) {
29567
29618
  src: img.getAttribute('src'),
29568
29619
  alt: img.getAttribute('alt'),
29569
29620
  title: img.getAttribute('title'),
29570
- width: widthMatch ? widthMatch[1] : null,
29571
- height: heightMatch ? heightMatch[1] : null,
29621
+ width: widthMatch ? parseInt(widthMatch[1]) : img.getAttribute('width') ? parseInt(img.getAttribute('width')) : null,
29622
+ height: heightMatch ? parseInt(heightMatch[1]) : img.getAttribute('height') ? parseInt(img.getAttribute('height')) : null,
29623
+ align: element.getAttribute('data-align') || 'left',
29624
+ display: element.getAttribute('data-display') || 'block',
29625
+ spacing: element.getAttribute('data-spacing') || 'medium',
29626
+ caption: figcaption ? figcaption.textContent : '',
29627
+ captionPosition: figcaption ? 'bottom' : 'none'
29628
+ };
29629
+ }
29630
+ }, {
29631
+ tag: 'div[data-display][data-align]',
29632
+ getAttrs: function getAttrs(element) {
29633
+ var img = element.querySelector('img');
29634
+ var figcaption = element.querySelector('figcaption');
29635
+ if (!img) return false;
29636
+
29637
+ // Extract width and height from img style
29638
+ var imgStyle = img.getAttribute('style') || '';
29639
+ var widthMatch = imgStyle.match(/width:\s*(\d+)px/);
29640
+ var heightMatch = imgStyle.match(/height:\s*(\d+)px/);
29641
+ return {
29642
+ src: img.getAttribute('src'),
29643
+ alt: img.getAttribute('alt'),
29644
+ title: img.getAttribute('title'),
29645
+ width: widthMatch ? parseInt(widthMatch[1]) : img.getAttribute('width') ? parseInt(img.getAttribute('width')) : null,
29646
+ height: heightMatch ? parseInt(heightMatch[1]) : img.getAttribute('height') ? parseInt(img.getAttribute('height')) : null,
29572
29647
  align: element.getAttribute('data-align') || 'left',
29648
+ display: element.getAttribute('data-display') || 'block',
29573
29649
  spacing: element.getAttribute('data-spacing') || 'medium',
29574
29650
  caption: figcaption ? figcaption.textContent : '',
29575
29651
  captionPosition: figcaption ? 'bottom' : 'none'
@@ -29585,9 +29661,10 @@ function _objectWithoutPropertiesLoose(r, e) {
29585
29661
  src: img.getAttribute('src'),
29586
29662
  alt: img.getAttribute('alt'),
29587
29663
  title: img.getAttribute('title'),
29588
- width: img.getAttribute('width'),
29589
- height: img.getAttribute('height'),
29664
+ width: img.getAttribute('width') ? parseInt(img.getAttribute('width')) : null,
29665
+ height: img.getAttribute('height') ? parseInt(img.getAttribute('height')) : null,
29590
29666
  align: element.getAttribute('data-align') || 'left',
29667
+ display: element.getAttribute('data-display') || 'block',
29591
29668
  spacing: element.getAttribute('data-spacing') || 'medium',
29592
29669
  caption: figcaption ? figcaption.textContent : '',
29593
29670
  captionPosition: figcaption ? 'bottom' : 'none'
@@ -29871,6 +29948,14 @@ function _objectWithoutPropertiesLoose(r, e) {
29871
29948
  img.style.margin = '0';
29872
29949
  img.style.verticalAlign = 'top';
29873
29950
 
29951
+ // Apply width and height from attributes to style for proper rendering
29952
+ if (HTMLAttributes.width) {
29953
+ img.style.width = HTMLAttributes.width + 'px';
29954
+ }
29955
+ if (HTMLAttributes.height) {
29956
+ img.style.height = HTMLAttributes.height + 'px';
29957
+ }
29958
+
29874
29959
  // Add resize handles
29875
29960
  var resizeHandle = document.createElement('div');
29876
29961
  resizeHandle.className = 'resize-handle';
@@ -30525,6 +30610,17 @@ var uploadMixin = {
30525
30610
  /* unused harmony reexport * */
30526
30611
 
30527
30612
 
30613
+ /***/ }),
30614
+
30615
+ /***/ "ef69":
30616
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
30617
+
30618
+ "use strict";
30619
+ /* 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_645beb94_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a99c");
30620
+ /* 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_645beb94_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_645beb94_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
30621
+ /* unused harmony reexport * */
30622
+
30623
+
30528
30624
  /***/ }),
30529
30625
 
30530
30626
  /***/ "f39e":
@@ -30854,7 +30950,7 @@ if (typeof window !== 'undefined') {
30854
30950
  // EXTERNAL MODULE: ./src/components/PremiumBblEditor.vue + 4 modules
30855
30951
  var PremiumBblEditor = __webpack_require__("2cce");
30856
30952
 
30857
- // 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
30953
+ // 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=cc6a3522&scoped=true
30858
30954
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"premium-editor-container",class:[
30859
30955
  ("theme-" + _vm.theme),
30860
30956
  _vm.editorClass
@@ -30862,7 +30958,7 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
30862
30958
  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")])])}]
30863
30959
 
30864
30960
 
30865
- // CONCATENATED MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=template&id=f08bc882&scoped=true
30961
+ // CONCATENATED MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=template&id=cc6a3522&scoped=true
30866
30962
 
30867
30963
  // EXTERNAL MODULE: external "@tiptap/vue-2"
30868
30964
  var vue_2_ = __webpack_require__("9637");
@@ -32591,8 +32687,8 @@ var LineHeight = core_["Extension"].create({
32591
32687
  });
32592
32688
  // CONCATENATED MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=script&lang=js
32593
32689
  /* harmony default export */ var components_PremiumBblEditorOptionsAPIvue_type_script_lang_js = (PremiumBblEditorOptionsAPIvue_type_script_lang_js);
32594
- // EXTERNAL MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=style&index=0&id=f08bc882&prod&scoped=true&lang=css
32595
- var PremiumBblEditorOptionsAPIvue_type_style_index_0_id_f08bc882_prod_scoped_true_lang_css = __webpack_require__("c4c0");
32690
+ // EXTERNAL MODULE: ./src/components/PremiumBblEditorOptionsAPI.vue?vue&type=style&index=0&id=cc6a3522&prod&scoped=true&lang=css
32691
+ var PremiumBblEditorOptionsAPIvue_type_style_index_0_id_cc6a3522_prod_scoped_true_lang_css = __webpack_require__("4ddd");
32596
32692
 
32597
32693
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
32598
32694
  var componentNormalizer = __webpack_require__("2877");
@@ -32612,7 +32708,7 @@ var component = Object(componentNormalizer["a" /* default */])(
32612
32708
  staticRenderFns,
32613
32709
  false,
32614
32710
  null,
32615
- "f08bc882",
32711
+ "cc6a3522",
32616
32712
  null
32617
32713
 
32618
32714
  )