@innovastudio/contentbuilder 1.5.30 → 1.5.32
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/package.json
CHANGED
|
@@ -48167,7 +48167,8 @@ class Hyperlink {
|
|
|
48167
48167
|
selection = selectionText;
|
|
48168
48168
|
const range = selection.getRangeAt(0);
|
|
48169
48169
|
const fragment = range.extractContents();
|
|
48170
|
-
const link =
|
|
48170
|
+
const link = this.builder.doc.createElement('a'); //
|
|
48171
|
+
|
|
48171
48172
|
link.setAttribute('href', url);
|
|
48172
48173
|
link.setAttribute('title', title);
|
|
48173
48174
|
if (modal.querySelector('.input-newwindow').checked) {
|
|
@@ -48187,7 +48188,8 @@ class Hyperlink {
|
|
|
48187
48188
|
} else if (selectionElm) {
|
|
48188
48189
|
selection = selectionElm;
|
|
48189
48190
|
selectionElm.innerHTML = `<a class="dummylink" href="dummy">${linktext}</a>`;
|
|
48190
|
-
let link =
|
|
48191
|
+
let link = this.builder.doc.querySelector('.dummylink'); //
|
|
48192
|
+
|
|
48191
48193
|
link.setAttribute('href', url);
|
|
48192
48194
|
link.setAttribute('title', title);
|
|
48193
48195
|
if (modal.querySelector('.input-newwindow').checked) {
|
|
@@ -83411,6 +83413,37 @@ class Draggable {
|
|
|
83411
83413
|
}
|
|
83412
83414
|
}
|
|
83413
83415
|
updateBlockStyle(target) {
|
|
83416
|
+
// Block placement should must not 50% outside the container
|
|
83417
|
+
const container = target.closest('.box-canvas');
|
|
83418
|
+
let containerHeight = container.offsetHeight;
|
|
83419
|
+
let containerWidth = container.offsetWidth;
|
|
83420
|
+
/*
|
|
83421
|
+
if(target.offsetTop + target.offsetHeight>=containerHeight) {
|
|
83422
|
+
target.style.top = containerHeight-target.offsetHeight +'px';
|
|
83423
|
+
}
|
|
83424
|
+
if(target.offsetTop<=0) {
|
|
83425
|
+
target.style.top = '0px';
|
|
83426
|
+
}
|
|
83427
|
+
if(target.offsetLeft + target.offsetWidth>=åcontainerWidth) {
|
|
83428
|
+
target.style.left = (containerWidth-target.offsetWidth) +'px';
|
|
83429
|
+
}
|
|
83430
|
+
if(target.offsetLeft<=0) {
|
|
83431
|
+
target.style.left = '0px';
|
|
83432
|
+
}
|
|
83433
|
+
*/
|
|
83434
|
+
if (target.offsetTop + target.offsetHeight <= target.offsetHeight / 2) {
|
|
83435
|
+
target.style.top = '0px';
|
|
83436
|
+
}
|
|
83437
|
+
if (containerHeight - target.offsetTop <= target.offsetHeight / 2) {
|
|
83438
|
+
target.style.top = containerHeight - target.offsetHeight + 'px';
|
|
83439
|
+
}
|
|
83440
|
+
if (target.offsetLeft + target.offsetWidth <= target.offsetWidth / 2) {
|
|
83441
|
+
target.style.left = '0px';
|
|
83442
|
+
}
|
|
83443
|
+
if (containerWidth - target.offsetLeft <= target.offsetWidth / 2) {
|
|
83444
|
+
target.style.left = containerWidth - target.offsetWidth + 'px';
|
|
83445
|
+
}
|
|
83446
|
+
|
|
83414
83447
|
// Replace with ruler's alignment
|
|
83415
83448
|
if (this.ruler.rulerTop !== null) target.style.top = this.ruler.rulerTop + 'px';
|
|
83416
83449
|
if (this.ruler.rulerBottom !== null) target.style.top = this.ruler.rulerBottom - target.offsetHeight + 'px'; //new
|
|
@@ -89057,6 +89090,18 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
89057
89090
|
});
|
|
89058
89091
|
var html = result[0].html;
|
|
89059
89092
|
var noedit = result[0].noedit;
|
|
89093
|
+
if (result[0].mode === 'canvas') {
|
|
89094
|
+
html = result[0].html2;
|
|
89095
|
+
if (!html) {
|
|
89096
|
+
html = `
|
|
89097
|
+
<div class="row">
|
|
89098
|
+
<div class="column pt-0 pb-0 pl-0 pr-0 flex flex-col justify-center">
|
|
89099
|
+
<img src="${this.opts.snippetPath}images/img-2400x1350.png" alt="">
|
|
89100
|
+
</div>
|
|
89101
|
+
</div>
|
|
89102
|
+
`;
|
|
89103
|
+
}
|
|
89104
|
+
}
|
|
89060
89105
|
var bSnippet;
|
|
89061
89106
|
if (html.indexOf('"row') === -1) {
|
|
89062
89107
|
bSnippet = true; // Just snippet (without row/column grid)
|