@innovastudio/contentbox 1.2.2 → 1.2.5
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/README.md +77 -57
- package/package.json +2 -2
- package/public/contentbox/contentbox.esm.js +551 -87
- package/public/contentbox/contentbox.min.js +3 -3
|
@@ -8058,7 +8058,7 @@ class EditBox {
|
|
|
8058
8058
|
this.builderStuff = this.builder.builderStuff;
|
|
8059
8059
|
const builderStuff = this.builderStuff;
|
|
8060
8060
|
let html = '' + '<div id="divBoxTool">' + '<form id="form-upload-cover" data-tooltip-top data-title="' + out('Background Image') + '" target="frame-upload-cover" method="post" action="' + this.builder.coverImageHandler + '" enctype="multipart/form-data" style="position:relative;width:40px;height:40px;display:inline-block;float:left;background: rgb(90, 156, 38);">' + '<div style="width:40px;height:40px;overflow:hidden;">' + '<div style="position:absolute;width:100%;height:100%;"><svg class="is-icon-flex" style="position: absolute;top: 12px;left: 12px;fill:rgb(255,255,255);"><use xlink:href="#ion-image"></use></svg></div>' + '<input type="file" title="' + out('Background Image') + '" id="fileCover" name="fileCover" accept="image/*" style="position:absolute;top:-30px;left:0;width:100%;height:80px;opacity: 0;cursor: pointer;"/>' + '</div>' + '<input id="hidcustomval" name="hidcustomval" type="hidden" value="" />' + '<iframe id="frame-upload-cover" name="frame-upload-cover" src="about:blank" style="width:1px;height:1px;position:absolute;top:0;right:-100000px"></iframe>' + '</form>' + '<button id="btnEditBox" data-tooltip-top data-title="' + out('Box Settings') + '" title="' + out('Box Settings') + '"><svg class="is-icon-flex"><use xlink:href="#ion-wrench"></use></svg></button>' + '<button id="btnEditModule" data-tooltip-top data-title="' + out('Module Settings') + '" title="' + out('Module Settings') + '"><svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg></button>' + '</div>' + '' + '<div class="is-modal editmodule">' + '<div style="max-width:900px;height:570px;padding:0;box-sizing:border-box;position:relative;">' + '<div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">' + out('Module Settings') + '</div>' + '<iframe style="position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-bottom:60px solid transparent;border-top:40px solid transparent;margin:0;box-sizing:border-box;" src="about:blank"></iframe>' + '<input id="hidModuleCode" type="hidden" />' + '<input id="hidModuleSettings" type="hidden" />' + '<button class="input-ok classic" style="height:60px;position:absolute;left:0;bottom:0;">' + out('Ok') + '</button>' + '</div>' + '</div>' + '' + '<div class="is-modal editcustomcode">' + '<div style="max-width:900px;height:570px;padding:0;box-sizing:border-box;position:relative;">' + '<div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">' + out('Custom Code (Javascript Allowed)') + '</div>' + '<textarea id="txtBoxCustomCode" class="inptxt" style="background: #fff;position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-bottom:60px solid transparent;border-top:40px solid transparent;box-sizing:border-box;"></textarea>' + '<input id="hidBoxCustomCode" type="hidden" />' + '<button class="cell-html-larger" style="width:35px;height:35px;position:absolute;right:0;top:0;background:transparent;z-index:2;"><svg class="is-icon-flex" style="width:19px;height:19px;fill:rgb(170, 170, 170);"><use xlink:href="#ion-arrow-expand"></use></svg></button>' + '<button class="input-ok classic" style="height:60px;position:absolute;left:0;bottom:0;">' + out('Ok') + '</button>' + '</div>' + '</div>' + '<div class="is-modal editbox">' + '<div class="is-modal-content" style="max-width:380px;min-height:300px;padding:0">' + '<div class="is-modal-bar is-draggable">' + out('Box Settings') + '</div>' + '<div class="is-tabs clearfix" style="padding-top:37px;">' + '<a id="tabBoxGeneral" href="" data-content="divBoxGeneral" class="active">' + out('General') + '</a>' + '<a id="tabBoxContentContainer" href="" data-content="divBoxContentContainer">' + out('Content') + '</a>' + '<a id="tabBoxContentText" href="" data-content="divBoxContentText">' + out('Text') + '</a>' + '<a id="tabBoxImage" href="" data-content="divBoxImage">' + out('Image') + '</a>' + '<a id="tabBoxAnimate" href="" data-content="divBoxAnimate">' + out('Animate') + '</a>' + '<a id="tabBoxClick" href="" data-content="divBoxClick">' + out('On Click') + '</a>' + '</div>' + '<div id="divBoxGeneral" class="is-tab-content" data-group="boxsettings" style="display:flex;padding-top:0">' + '<div id="divBoxSize">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Box Size') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-smaller" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-larger" style="width:40px;border-left:none">+</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '<div id="divContentSize">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Content Size') + ': <span class="val-box-size" style="font-size:12px"></span></div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<input class="inp-box-size" type="text" style="display:none;width:80px;height:35px;text-align:center;font-size:12px;" />' + '<button class="cmd-box-size" data-value="500" style="width:40px;border-left:none">500</button>' + '<button class="cmd-box-size" data-value="600" style="width:40px;border-left:none">600</button>' + '<button class="cmd-box-size" data-value="700" style="width:40px;border-left:none">700</button>' + '<button class="cmd-box-size" data-value="800" style="width:40px;border-top:none">800</button>' + '<button class="cmd-box-size" data-value="900" style="width:40px;border-top:none">900</button>' + '<button class="cmd-box-size" data-value="1000" style="width:40px;border-top:none;border-left:none">1000</button>' + '<button class="cmd-box-size" data-value="1100" style="width:40px;border-top:none;border-left:none">1100</button>' + '<button class="cmd-box-size" data-value="1200" style="width:40px;border-top:none;border-left:none">1200</button>' + '<button class="cmd-box-size" data-value="1300" style="width:40px;border-top:none;border-left:none">1300</button>' + '<button class="cmd-box-size" data-value="1400" style="width:40px;border-top:none;border-left:none">1400</button>' + '<button class="cmd-box-size" data-value="1500" style="width:40px;border-top:none;border-left:none">1500</button>' + '<button class="cmd-box-size" data-value="1600" style="width:40px;border-top:none;border-left:none">1600</button>' + '<button class="cmd-box-size" data-value="1800" style="width:40px;border-top:none;border-left:none">1800</button>' + '<button title="' + out('Clear') + '" class="cmd-box-size" data-value=""><svg class="is-icon-flex" style="width:10px;height:10px;"><use xlink:href="#icon-clean"></use></svg></button>' + '<button title="' + out('Decrease') + '" class="cmd-box-size" data-value="-" style="width:40px;border-top:none;border-left:none">-</button>' + '<button title="' + out('Increase') + '"class="cmd-box-size" data-value="+" style="width:40px;border-top:none;border-left:none">+</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '<div id="divBoxBackgroundColor">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Background Color') + '" class="input-box-bgcolor is-btn-color" style="margin-right:15px"></button>' + '<button title="' + out('Gradient') + '" class="input-box-gradient classic" data-value="+">' + out('Gradient') + '</button>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Background Image') + ':</div>' + '<div style="height:auto">' + '<div style="display:flex;align-items:flex-end;">' + '<div class="box-bgimage-preview"></div>' + '<label class="label-box-bgimage-grayscale label-checkbox" for="chkBoxBgImageGrayscale" style="margin:0;margin-left:8px;margin-bottom:5px;"><input id="chkBoxBgImageGrayscale" class="chk-box-bgimage-grayscale" type="checkbox" /> ' + out('Grayscale') + '</label>' + '</div>' + '<div style="display:flex;align-items: flex-end;">' + '<button title="' + out('Image') + '" class="input-box-bgimage">' + '<svg class="is-icon-flex"><use xlink:href="#ion-image"></use></svg>' + '<span>' + out('Image') + '</span>' + '</button>' + '<button title="' + out('Remove') + '" class="input-box-bgremove"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>' + '<button title="' + out('Adjust') + '" class="input-box-bgimageadjust"><svg class="is-icon-flex"><use xlink:href="#ion-wrench"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '<div id="divBoxPickPhoto" class="is-settings" style="padding-top:20px">' + '<button class="cmd-box-pickphoto" data-value="" style="width:100%"><svg class="is-icon-flex" style=""><use xlink:href="#ion-image"></use></svg></button>' + '</div>' + '<div style="display:flex;justify-content:flex-end;">' + '<button title="' + out('Add Text') + '" class="cmd-box-addtext" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#ion-android-add"></use></svg> <span>' + out('Text') + '</span></button>' + '<button title="' + out('Remove Text') + '" class="cmd-box-removetext" style="display:none;margin-top:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg> <span>' + out('Clear') + '</span></button>' + '</div>' + '<p id="divNoBoxSettings" style="text-align: center;display:none;">' + out('This box has no available settings.') + '</p>' + '</div>' + '<div id="divBoxClick" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<label for="inpBoxLinkSource" style="display:block;padding-top:20px;">' + out('Open') + ':</label>' + '<div class="image-src" style="display:flex">' + '<input id="inpBoxLinkSource" class="input-src" type="text" style="height:38px">' + '<button title="' + out('Select') + '" class="input-select" style="flex:none;width:40px;height:38px;background:transparent;"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>' + '<div class="image-larger5" style="position: relative; flex: 0 0 auto; width: 40px; height: 38px; box-shadow: rgba(0, 0, 0, 0.32) 0px 3px 6px -6px;">' + '<form class="form-upload-larger" target="frameTargetBoxLinkUpload" method="post" action="' + this.builder.largerImageHandler + '" enctype="multipart/form-data" style="position:absolute;top:0;left:0;width:100%;height:100%;">' + '<input id="hidRefId5" name="hidRefId" type="hidden" value="">' + '<svg class="is-icon-flex" style="position: absolute;top: 10px;left: 15px;"><use xlink:href="#ion-image"></use></svg>' + '<input title="' + out('Select') + '" id="fileImage5" name="fileImage" type="file" accept="image/*,video/mp4" style="position:absolute;top:-30px;left:0;width:100%;height:80px;opacity: 0;cursor: pointer;">' + '</form>' + '<iframe id="frameTargetBoxLinkUpload" name="frameTargetBoxLinkUpload" src="about:blank" style="width:1px;height:1px;position:absolute;top:0;right:-100000px"></iframe>' + '</div>' + '</div>' + '<div style="padding-top:20px">' + '<button class="cmd-box-testclick">' + out('Test') + '</button>' + '</div>' + '</div>';
|
|
8061
|
-
html += '<div id="divBoxContentText" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Text Style') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Light') + '" class="cmd-box-textcolor" data-value="light">' + out('Light') + '</button>' + '<button title="' + out('Dark') + '" class="cmd-box-textcolor" data-value="dark" style="border-left:none;">' + out('Dark') + '</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-textcolor" data-value="" style="border-left:none;">' + out('Not Set') + '</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '<div style="padding-top:20px;">' + '<label for="chkOptimizeTextSize" style="margin:0;"><input id="chkOptimizeTextSize" type="checkbox" /> ' + out('Optimize text sizes on large screen.') + '</label>' + '</div>' + '<div id="divContainerTransparency" style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Transparency') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Increase') + '" class="cmd-box-textopacity" data-value="+" style="width:40px"> + </button>' + '<button title="' + out('Decrease') + '" class="cmd-box-textopacity" data-value="-" style="width:40px;border-left:none;"> - </button>' + '<button title="' + out('Not Set') + '" class="cmd-box-textopacity" data-value="" style="border-left:none;">' + out('Not Set') + '</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '<div id="divContainerTextAlign" style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">Align:</div>' + '<div style="display:flex">' + '<button title="' + out('Align Left') + '" class="cmd-box-textalign" data-value="left" style="width:40px"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-left"></use></svg></button>' + '<button title="' + out('Align Center') + '" class="cmd-box-textalign" data-value="center" style="width:40px;border-left:none;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-center"></use></svg></button>' + '<button title="' + out('Align Right') + '" class="cmd-box-textalign" data-value="right" style="width:40px;border-left:none;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-right"></use></svg></button>' + '<button title="' + out('Align Full') + '" class="cmd-box-textalign" data-value="justify" style="width:40px;border-left:none;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-full"></use></svg></button>' + '<button title="' + out('Not Set') + '" class="cmd-box-textalign" data-value="" style="border-left:none;">' + out('Not Set') + '</button>' + '<br style="clear:both">' + '</div>' + '</div>' + (this.builder.settings.enableContentStyle ? '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Typography') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Change Style') + '" class="cmd-box-typography" data-value="+"> ' + out('Change Style') + ' </button>' + '<br style="clear:both">' + '</div>' + '</div>' : '') + '</div>' + '<div id="divBoxContentContainer" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="padding-top:10px;">' + '<label for="chkParallaxContent" style="margin:0;"><input id="chkParallaxContent" type="checkbox" /> ' + out('Parallax') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkFadeContent" style="margin:0;"><input id="chkFadeContent" type="checkbox" /> ' + out('Fade') + '</label>' + '</div>' + '<div style="display:flex;flex-direction: row;">' + '<div style="display:flex;flex-direction: column;margin-right:20px;">' + '<div style="padding-top:13px;padding-bottom: 3px;">' + out('Position') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Top Left') + '" class="cmd-box-content-pos" data-value="topleft" style="width:40px;">↖</button>' + '<button title="' + out('Top Center') + '" class="cmd-box-content-pos" data-value="topcenter" style="width:40px;border-left:none;">↑</button>' + '<button title="' + out('Top Right') + '" class="cmd-box-content-pos" data-value="topright" style="width:40px;border-left:none;">↗</button>' + '</div>' + '<div style="display:flex">' + '<button title="' + out('Middle Left') + '" class="cmd-box-content-pos" data-value="middleleft" style="width:40px;border-top:none;">←</button>' + '<button title="' + out('Middle Center') + '" class="cmd-box-content-pos" data-value="middlecenter" style="width:40px;border-left:none;border-top:none;">☉</button>' + '<button title="' + out('Middle Right') + '" class="cmd-box-content-pos" data-value="middleright" style="width:40px;border-left:none;border-top:none;">→</button>' + '</div>' + '<div style="display:flex">' + '<button title="' + out('Bottom Left') + '" class="cmd-box-content-pos" data-value="bottomleft" style="width:40px;border-top:none;">↙</button>' + '<button title="' + out('Bottom Center') + '" class="cmd-box-content-pos" data-value="bottomcenter" style="width:40px;border-left:none;border-top:none;">↓</button>' + '<button title="' + out('Bottom Right') + '" class="cmd-box-content-pos" data-value="bottomright" style="width:40px;border-left:none;border-top:none;">↘</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 1px;">' + out('Height') + ':</div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<button title="' + out('Auto') + '" class="cmd-content-height" data-value="" style="width:60px">Auto</button>' + '<button title="' + out('Full') + '" class="cmd-content-height" data-value="100" style="width:40px">Full</button>' + '</div>' + '<div class="div-content-justify">' + '<div style="padding-top:10px;padding-bottom: 1px;">' + out('Justify') + ':</div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<button title="' + out('Top') + '" class="cmd-content-justify" data-value="flex-start" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-arrow-bar-to-up"></use></svg></button>' + '<button title="' + out('Bottom') + '" class="cmd-content-justify" data-value="flex-end" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-arrow-bar-to-down"></use></svg></button>' + '<button title="' + out('Space Between') + '" class="cmd-content-justify" data-value="space-between" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-space-between"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Vertical Adjustment') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-content-edge-y" data-value="-" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-content-edge-y" data-value="+" style="width:40px;border-left:none;">+</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-content-edge-y" data-value="" style="display:none;width:40px;border-left:none;min-width:100px;">' + out('Not Set') + '</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Horizontal Adjustment') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-content-edge-x" data-value="-" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-content-edge-x" data-value="+" style="width:40px;border-left:none;">+</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-content-edge-x" data-value="" style="display:none;width:40px;border-left:none;min-width:100px;">' + out('Not Set') + '</button>' + '</div>' + '</div>' + '<div style="padding-top:13px;">' + '<label for="chkAutofitContent" style="margin:0;"><input id="chkAutofitContent" type="checkbox" /> ' + out('Autofit Content on Mobile') + '</label>' + '</div>' + '</div>' + '<div id="divBoxImage" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + (this.builder.settings.onCoverImageSelectClick != null ? '<div style="padding-top:20px;">' + '<button class="cmd-box-selectasset" style="width:120px;">' + out('Select Image') + '</button>' + '</div>' + '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>' : '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>') + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg" style="margin:0;"><input id="chkParallaxBg" type="checkbox" /> ' + out('Parallax') + ' & ' + out('Scale') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg2" style="margin:0;"><input id="chkParallaxBg2" type="checkbox" /> ' + out('Parallax') + '</label>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Overlay Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Overlay Color') + '" class="input-box-overlaycolor is-btn-color" style="margin-right:15px"></button>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Overlay Transparency') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Increase') + '" class="cmd-box-overlayopacity" data-value="+" style="width:40px;">+</button>' + '<button title="' + out('Decrease') + '" class="cmd-box-overlayopacity" data-value="-" style="width:40px;border-left:none;">-</button>' + '<button title="' + out('None') + '" class="cmd-box-overlayopacity" data-value="0" style="border-left:none;min-width:100px;">' + out('None') + '</button>' + '</div>' + '</div>' + '</div>' + '<div id="divBoxAnimate" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="display:flex;flex-direction: column;">' + '<select class="cmd-box-animate">' + '<option value="">' + out('None') + '</option>' + '<option value="is-pulse">pulse</option>' + '<option value="is-bounceIn">bounceIn</option>' + '<option value="is-fadeIn">fadeIn</option>' + '<option value="is-fadeInDown">fadeInDown</option>' + '<option value="is-fadeInLeft">fadeInLeft</option>' + '<option value="is-fadeInRight">fadeInRight</option>' + '<option value="is-fadeInUp">fadeInUp</option>' + '<option value="is-flipInX">flipInX</option>' + '<option value="is-flipInY">flipInY</option>' + '<option value="is-slideInUp">slideInUp</option>' + '<option value="is-slideInDown">slideInDown</option>' + '<option value="is-slideInLeft">slideInLeft</option>' + '<option value="is-slideInRight">slideInRight</option>' + '<option value="is-zoomIn">zoomIn</option>' + '</select>' + '<label for="chkAnimOnce" style="margin:10px 0 0;"><input id="chkAnimOnce" type="checkbox" /> ' + out('Once') + '</label>' + '</div>' + '<div>' + '<label style="padding-top:20px;">' + out('Delay') + ': ' + '<select class="cmd-box-animatedelay" style="margin-top:3px;">' + '<option value="">' + out('None') + '</option>' + '<option value="delay-0ms">0s</option>' + '<option value="delay-100ms">100ms</option>' + '<option value="delay-200ms">200ms</option>' + '<option value="delay-300ms">300ms</option>' + '<option value="delay-400ms">400ms</option>' + '<option value="delay-500ms">500ms</option>' + '<option value="delay-600ms">600ms</option>' + '<option value="delay-700ms">700ms</option>' + '<option value="delay-800ms">800ms</option>' + '<option value="delay-900ms">900ms</option>' + '<option value="delay-1000ms">1000ms</option>' + '<option value="delay-1100ms">1100ms</option>' + '<option value="delay-1200ms">1200ms</option>' + '<option value="delay-1300ms">1300ms</option>' + '<option value="delay-1400ms">1400ms</option>' + '<option value="delay-1500ms">1500ms</option>' + '<option value="delay-1600ms">1600ms</option>' + '<option value="delay-1700ms">1700ms</option>' + '<option value="delay-1800ms">1800ms</option>' + '<option value="delay-1900ms">1900ms</option>' + '<option value="delay-2000ms">2000ms</option>' + '<option value="delay-2100ms">2100ms</option>' + '<option value="delay-2200ms">2200ms</option>' + '<option value="delay-2300ms">2300ms</option>' + '<option value="delay-2400ms">2400ms</option>' + '<option value="delay-2500ms">2500ms</option>' + '<option value="delay-2600ms">2600ms</option>' + '<option value="delay-2700ms">2700ms</option>' + '<option value="delay-2800ms">2800ms</option>' + '<option value="delay-2900ms">2900ms</option>' + '<option value="delay-3000ms">3000ms</option>' + '</select></label>' + '</div>' + '<div style="padding-top:20px">' + '<button class="cmd-box-animate-test" style="width:100%">' + out('Test') + '</button>' + '</div>' + '</div>' + '</div>' + '</div>' + '' + '<div class="is-modal pickphoto">' + '<div style="max-width:1000px;height:570px;padding:0;box-sizing:border-box;position:relative;">' + '<div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">' + out('Photos') + '</div>' + '<iframe style="position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-top:40px solid transparent;margin:0;box-sizing:border-box;" src="about:blank"></iframe>' + '</div>' + '</div>' + '';
|
|
8061
|
+
html += '<div id="divBoxContentText" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Text Style') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Light') + '" class="cmd-box-textcolor" data-value="light">' + out('Light') + '</button>' + '<button title="' + out('Dark') + '" class="cmd-box-textcolor" data-value="dark" style="border-left:none;">' + out('Dark') + '</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-textcolor" data-value="" style="border-left:none;">' + out('Not Set') + '</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '<div style="padding-top:20px;">' + '<label for="chkOptimizeTextSize" style="margin:0;"><input id="chkOptimizeTextSize" type="checkbox" /> ' + out('Optimize text sizes on large screen.') + '</label>' + '</div>' + '<div id="divContainerTransparency" style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Transparency') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Increase') + '" class="cmd-box-textopacity" data-value="+" style="width:40px"> + </button>' + '<button title="' + out('Decrease') + '" class="cmd-box-textopacity" data-value="-" style="width:40px;border-left:none;"> - </button>' + '<button title="' + out('Not Set') + '" class="cmd-box-textopacity" data-value="" style="border-left:none;">' + out('Not Set') + '</button>' + '<br style="clear:both">' + '</div>' + '</div>' + '<div id="divContainerTextAlign" style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">Align:</div>' + '<div style="display:flex">' + '<button title="' + out('Align Left') + '" class="cmd-box-textalign" data-value="left" style="width:40px"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-left"></use></svg></button>' + '<button title="' + out('Align Center') + '" class="cmd-box-textalign" data-value="center" style="width:40px;border-left:none;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-center"></use></svg></button>' + '<button title="' + out('Align Right') + '" class="cmd-box-textalign" data-value="right" style="width:40px;border-left:none;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-right"></use></svg></button>' + '<button title="' + out('Align Full') + '" class="cmd-box-textalign" data-value="justify" style="width:40px;border-left:none;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-align-full"></use></svg></button>' + '<button title="' + out('Not Set') + '" class="cmd-box-textalign" data-value="" style="border-left:none;">' + out('Not Set') + '</button>' + '<br style="clear:both">' + '</div>' + '</div>' + (this.builder.settings.enableContentStyle ? '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Typography') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Change Style') + '" class="cmd-box-typography" data-value="+"> ' + out('Change Style') + ' </button>' + '<br style="clear:both">' + '</div>' + '</div>' : '') + '</div>' + '<div id="divBoxContentContainer" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="padding-top:10px;">' + '<label for="chkParallaxContent" style="margin:0;"><input id="chkParallaxContent" type="checkbox" /> ' + out('Parallax') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkFadeContent" style="margin:0;"><input id="chkFadeContent" type="checkbox" /> ' + out('Fade') + '</label>' + '</div>' + '<div style="display:flex;flex-direction: row;">' + '<div style="display:flex;flex-direction: column;margin-right:20px;">' + '<div style="padding-top:13px;padding-bottom: 3px;">' + out('Position') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Top Left') + '" class="cmd-box-content-pos" data-value="topleft" style="width:40px;">↖</button>' + '<button title="' + out('Top Center') + '" class="cmd-box-content-pos" data-value="topcenter" style="width:40px;border-left:none;">↑</button>' + '<button title="' + out('Top Right') + '" class="cmd-box-content-pos" data-value="topright" style="width:40px;border-left:none;">↗</button>' + '</div>' + '<div style="display:flex">' + '<button title="' + out('Middle Left') + '" class="cmd-box-content-pos" data-value="middleleft" style="width:40px;border-top:none;">←</button>' + '<button title="' + out('Middle Center') + '" class="cmd-box-content-pos" data-value="middlecenter" style="width:40px;border-left:none;border-top:none;">☉</button>' + '<button title="' + out('Middle Right') + '" class="cmd-box-content-pos" data-value="middleright" style="width:40px;border-left:none;border-top:none;">→</button>' + '</div>' + '<div style="display:flex">' + '<button title="' + out('Bottom Left') + '" class="cmd-box-content-pos" data-value="bottomleft" style="width:40px;border-top:none;">↙</button>' + '<button title="' + out('Bottom Center') + '" class="cmd-box-content-pos" data-value="bottomcenter" style="width:40px;border-left:none;border-top:none;">↓</button>' + '<button title="' + out('Bottom Right') + '" class="cmd-box-content-pos" data-value="bottomright" style="width:40px;border-left:none;border-top:none;">↘</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 1px;">' + out('Height') + ':</div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<button title="' + out('Auto') + '" class="cmd-content-height" data-value="" style="width:60px">Auto</button>' + '<button title="' + out('Full') + '" class="cmd-content-height" data-value="100" style="width:40px">Full</button>' + '</div>' + '<div class="div-content-justify">' + '<div style="padding-top:10px;padding-bottom: 1px;">' + out('Justify') + ':</div>' + '<div style="display: flex;flex-direction: row;flex-wrap: wrap;">' + '<button title="' + out('Top') + '" class="cmd-content-justify" data-value="flex-start" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-arrow-bar-to-up"></use></svg></button>' + '<button title="' + out('Bottom') + '" class="cmd-content-justify" data-value="flex-end" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-arrow-bar-to-down"></use></svg></button>' + '<button title="' + out('Space Between') + '" class="cmd-content-justify" data-value="space-between" style="width:40px"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-space-between"></use></svg></button>' + '</div>' + '</div>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Vertical Adjustment') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-content-edge-y" data-value="-" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-content-edge-y" data-value="+" style="width:40px;border-left:none;">+</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-content-edge-y" data-value="" style="display:none;width:40px;border-left:none;min-width:100px;">' + out('Not Set') + '</button>' + '</div>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Horizontal Adjustment') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-content-edge-x" data-value="-" style="width:40px;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-content-edge-x" data-value="+" style="width:40px;border-left:none;">+</button>' + '<button title="' + out('Not Set') + '" class="cmd-box-content-edge-x" data-value="" style="display:none;width:40px;border-left:none;min-width:100px;">' + out('Not Set') + '</button>' + '</div>' + '</div>' + '<div style="padding-top:13px;">' + '<label for="chkAutofitContent" style="margin:0;"><input id="chkAutofitContent" type="checkbox" /> ' + out('Autofit Content on Mobile') + '</label>' + '</div>' + '</div>' + '<div id="divBoxImage" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + (this.builder.settings.onCoverImageSelectClick != null ? '<div style="padding-top:20px;">' + '<button class="cmd-box-selectasset" style="width:120px;">' + out('Select Image') + '</button>' + '</div>' + '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>' : '<div style="padding-top:20px;">' + '<label for="chkAnimateBg" style="margin:0;"><input id="chkAnimateBg" type="checkbox" /> ' + out('Ken Burns Effect') + '</label>' + '</div>') + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg" style="margin:0;"><input id="chkParallaxBg" type="checkbox" /> ' + out('Parallax') + ' & ' + out('Scale') + '</label>' + '</div>' + '<div style="padding-top:10px;">' + '<label for="chkParallaxBg2" style="margin:0;"><input id="chkParallaxBg2" type="checkbox" /> ' + out('Parallax') + '</label>' + '</div>' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Overlay Color') + ':</div>' + '<div style="display:flex;">' + '<button title="' + out('Overlay Color') + '" class="input-box-overlaycolor is-btn-color" style="margin-right:15px"></button>' + '</div>' + '<div style="display:flex;flex-direction: column;">' + '<div style="padding-top:20px;padding-bottom: 3px;">' + out('Overlay Transparency') + ':</div>' + '<div style="display:flex">' + '<button title="' + out('Decrease') + '" class="cmd-box-overlayopacity" data-value="-" style="width:40px;border-left:none;">-</button>' + '<button title="' + out('Increase') + '" class="cmd-box-overlayopacity" data-value="+" style="width:40px;">+</button>' + '<button title="' + out('None') + '" class="cmd-box-overlayopacity" data-value="0" style="border-left:none;min-width:100px;">' + out('None') + '</button>' + '</div>' + '</div>' + '</div>' + '<div id="divBoxAnimate" class="is-tab-content" data-group="boxsettings" style="padding-top:0">' + '<div style="display:flex;flex-direction: column;">' + '<select class="cmd-box-animate">' + '<option value="">' + out('None') + '</option>' + '<option value="is-pulse">pulse</option>' + '<option value="is-bounceIn">bounceIn</option>' + '<option value="is-fadeIn">fadeIn</option>' + '<option value="is-fadeInDown">fadeInDown</option>' + '<option value="is-fadeInLeft">fadeInLeft</option>' + '<option value="is-fadeInRight">fadeInRight</option>' + '<option value="is-fadeInUp">fadeInUp</option>' + '<option value="is-flipInX">flipInX</option>' + '<option value="is-flipInY">flipInY</option>' + '<option value="is-slideInUp">slideInUp</option>' + '<option value="is-slideInDown">slideInDown</option>' + '<option value="is-slideInLeft">slideInLeft</option>' + '<option value="is-slideInRight">slideInRight</option>' + '<option value="is-zoomIn">zoomIn</option>' + '</select>' + '<label for="chkAnimOnce" style="margin:10px 0 0;"><input id="chkAnimOnce" type="checkbox" /> ' + out('Once') + '</label>' + '</div>' + '<div>' + '<label style="padding-top:20px;">' + out('Delay') + ': ' + '<select class="cmd-box-animatedelay" style="margin-top:3px;">' + '<option value="">' + out('None') + '</option>' + '<option value="delay-0ms">0s</option>' + '<option value="delay-100ms">100ms</option>' + '<option value="delay-200ms">200ms</option>' + '<option value="delay-300ms">300ms</option>' + '<option value="delay-400ms">400ms</option>' + '<option value="delay-500ms">500ms</option>' + '<option value="delay-600ms">600ms</option>' + '<option value="delay-700ms">700ms</option>' + '<option value="delay-800ms">800ms</option>' + '<option value="delay-900ms">900ms</option>' + '<option value="delay-1000ms">1000ms</option>' + '<option value="delay-1100ms">1100ms</option>' + '<option value="delay-1200ms">1200ms</option>' + '<option value="delay-1300ms">1300ms</option>' + '<option value="delay-1400ms">1400ms</option>' + '<option value="delay-1500ms">1500ms</option>' + '<option value="delay-1600ms">1600ms</option>' + '<option value="delay-1700ms">1700ms</option>' + '<option value="delay-1800ms">1800ms</option>' + '<option value="delay-1900ms">1900ms</option>' + '<option value="delay-2000ms">2000ms</option>' + '<option value="delay-2100ms">2100ms</option>' + '<option value="delay-2200ms">2200ms</option>' + '<option value="delay-2300ms">2300ms</option>' + '<option value="delay-2400ms">2400ms</option>' + '<option value="delay-2500ms">2500ms</option>' + '<option value="delay-2600ms">2600ms</option>' + '<option value="delay-2700ms">2700ms</option>' + '<option value="delay-2800ms">2800ms</option>' + '<option value="delay-2900ms">2900ms</option>' + '<option value="delay-3000ms">3000ms</option>' + '</select></label>' + '</div>' + '<div style="padding-top:20px">' + '<button class="cmd-box-animate-test" style="width:100%">' + out('Test') + '</button>' + '</div>' + '</div>' + '</div>' + '</div>' + '' + '<div class="is-modal pickphoto">' + '<div style="max-width:1000px;height:570px;padding:0;box-sizing:border-box;position:relative;">' + '<div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">' + out('Photos') + '</div>' + '<iframe style="position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-top:40px solid transparent;margin:0;box-sizing:border-box;" src="about:blank"></iframe>' + '</div>' + '</div>' + '';
|
|
8062
8062
|
dom$K.appendHtml(builderStuff, html); // Box Tool
|
|
8063
8063
|
|
|
8064
8064
|
this.builder.boxTool = builderStuff.querySelector('#divBoxTool');
|
|
@@ -9177,7 +9177,7 @@ class EditBox {
|
|
|
9177
9177
|
let overlayColor = overlayBg.querySelector('.is-overlay-color');
|
|
9178
9178
|
|
|
9179
9179
|
if (!overlayColor) {
|
|
9180
|
-
overlayBg.insertAdjacentHTML('beforeend',
|
|
9180
|
+
overlayBg.insertAdjacentHTML('beforeend', `<div class="is-overlay-color ${this.builder.cssClasses.opacity.opacity_5}"></div>`);
|
|
9181
9181
|
overlayColor = overlayBg.querySelector('.is-overlay-color');
|
|
9182
9182
|
}
|
|
9183
9183
|
|
|
@@ -9190,8 +9190,17 @@ class EditBox {
|
|
|
9190
9190
|
}
|
|
9191
9191
|
|
|
9192
9192
|
if (s === '') {
|
|
9193
|
-
overlayColor.
|
|
9193
|
+
let overlayColor = overlayBg.querySelector('.is-overlay-color');
|
|
9194
|
+
if (overlayColor) overlayColor.parentNode.removeChild(overlayColor);
|
|
9194
9195
|
} else {
|
|
9196
|
+
// re-cehck because overlayColor can be removed here
|
|
9197
|
+
let overlayColor = overlayBg.querySelector('.is-overlay-color');
|
|
9198
|
+
|
|
9199
|
+
if (!overlayColor) {
|
|
9200
|
+
overlayBg.insertAdjacentHTML('beforeend', `<div class="is-overlay-color ${this.builder.cssClasses.opacity.opacity_5}"></div>`);
|
|
9201
|
+
overlayColor = overlayBg.querySelector('.is-overlay-color');
|
|
9202
|
+
}
|
|
9203
|
+
|
|
9195
9204
|
overlayColor.style.backgroundColor = s;
|
|
9196
9205
|
}
|
|
9197
9206
|
|
|
@@ -10298,6 +10307,44 @@ class EditBox {
|
|
|
10298
10307
|
this.builder.settings.onRender();
|
|
10299
10308
|
}
|
|
10300
10309
|
|
|
10310
|
+
setElementClass(element, command, classes, defaultClass) {
|
|
10311
|
+
let newClassName;
|
|
10312
|
+
|
|
10313
|
+
for (let i = 0; i < Object.keys(classes).length; i++) {
|
|
10314
|
+
let className = Object.values(classes)[i];
|
|
10315
|
+
|
|
10316
|
+
if (dom$K.hasClass(element, className)) {
|
|
10317
|
+
if (command === '+') {
|
|
10318
|
+
if (i + 1 === Object.keys(classes).length) return;
|
|
10319
|
+
newClassName = Object.values(classes)[i + 1];
|
|
10320
|
+
break;
|
|
10321
|
+
} else if (command === '-') {
|
|
10322
|
+
if (i - 1 < 0) return;
|
|
10323
|
+
newClassName = Object.values(classes)[i - 1];
|
|
10324
|
+
break;
|
|
10325
|
+
}
|
|
10326
|
+
}
|
|
10327
|
+
}
|
|
10328
|
+
|
|
10329
|
+
if (newClassName) {
|
|
10330
|
+
for (let i = 0; i < Object.keys(classes).length; i++) {
|
|
10331
|
+
let className = Object.values(classes)[i];
|
|
10332
|
+
dom$K.removeClass(element, className);
|
|
10333
|
+
}
|
|
10334
|
+
|
|
10335
|
+
dom$K.addClass(element, newClassName);
|
|
10336
|
+
} else {
|
|
10337
|
+
dom$K.addClass(element, defaultClass);
|
|
10338
|
+
}
|
|
10339
|
+
}
|
|
10340
|
+
|
|
10341
|
+
removeElementClass(element, classes) {
|
|
10342
|
+
for (let i = 0; i < Object.keys(classes).length; i++) {
|
|
10343
|
+
let className = Object.values(classes)[i];
|
|
10344
|
+
dom$K.removeClass(element, className);
|
|
10345
|
+
}
|
|
10346
|
+
}
|
|
10347
|
+
|
|
10301
10348
|
boxOverlayOpacity(s) {
|
|
10302
10349
|
let activeBox = this.builder.activeBox;
|
|
10303
10350
|
let overlay = activeBox.querySelector('.is-overlay');
|
|
@@ -10306,29 +10353,43 @@ class EditBox {
|
|
|
10306
10353
|
|
|
10307
10354
|
if (!overlayColor) {
|
|
10308
10355
|
let overlayBg = overlay.querySelector('.is-overlay-bg');
|
|
10309
|
-
overlayBg.insertAdjacentHTML('afterbegin',
|
|
10356
|
+
overlayBg.insertAdjacentHTML('afterbegin', `<div class="is-overlay-color ${this.builder.cssClasses.opacity.opacity_5}"></div>`);
|
|
10310
10357
|
overlayColor = overlay.querySelector('.is-overlay-color');
|
|
10311
10358
|
}
|
|
10312
10359
|
|
|
10313
|
-
if (
|
|
10314
|
-
|
|
10315
|
-
let opacity = overlayColor.style.opacity;
|
|
10316
|
-
if (opacity === 0.01) overlayColor.style.opacity = 0.025;else if (opacity === 0.025) overlayColor.style.opacity = 0.04;else if (opacity === 0.04) overlayColor.style.opacity = 0.055;else if (opacity === 0.055) overlayColor.style.opacity = 0.07;else if (opacity === 0.07) overlayColor.style.opacity = 0.085;else if (opacity === 0.085) overlayColor.style.opacity = 0.1;else if (opacity === 0.1) overlayColor.style.opacity = 0.125;else if (opacity === 0.125) overlayColor.style.opacity = 0.15;else if (opacity === 0.15) overlayColor.style.opacity = 0.2;else if (opacity === 0.2) overlayColor.style.opacity = 0.25;else if (opacity === 0.25) overlayColor.style.opacity = 0.3;else if (opacity === 0.3) overlayColor.style.opacity = 0.35;else if (opacity === 0.35) overlayColor.style.opacity = 0.4;else if (opacity === 0.4) overlayColor.style.opacity = 0.45;else if (opacity === 0.45) overlayColor.style.opacity = 0.5;else if (opacity === 0.5) overlayColor.style.opacity = 0.55;else if (opacity === 0.55) overlayColor.style.opacity = 0.6;else if (opacity === 0.6) overlayColor.style.opacity = 0.6;else overlayColor.style.opacity = 0.15;
|
|
10317
|
-
}
|
|
10360
|
+
if (this.builder.useCssClasses) {
|
|
10361
|
+
const classes = this.builder.cssClasses.opacity;
|
|
10318
10362
|
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10363
|
+
if (s === '0') {
|
|
10364
|
+
this.removeElementClass(overlayColor, classes);
|
|
10365
|
+
dom$K.addClass(overlayColor, classes.opacity_0);
|
|
10366
|
+
} else {
|
|
10367
|
+
this.setElementClass(overlayColor, s, classes, classes.opacity_10);
|
|
10368
|
+
}
|
|
10322
10369
|
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10370
|
+
overlayColor.style.opacity = '';
|
|
10371
|
+
overlayColor.style.display = '';
|
|
10372
|
+
} else {
|
|
10373
|
+
if (s === '+') {
|
|
10374
|
+
// overlayColor.style.display = 'block';
|
|
10375
|
+
let opacity = overlayColor.style.opacity;
|
|
10376
|
+
if (!opacity) overlayColor.style.opacity = 0.1;else if (opacity === '0.01') overlayColor.style.opacity = 0.025;else if (opacity === '0.025') overlayColor.style.opacity = 0.04;else if (opacity === '0.04') overlayColor.style.opacity = 0.055;else if (opacity === '0.055') overlayColor.style.opacity = 0.07;else if (opacity === '0.07') overlayColor.style.opacity = 0.085;else if (opacity === '0.085') overlayColor.style.opacity = 0.1;else if (opacity === '0.1') overlayColor.style.opacity = 0.125;else if (opacity === '0.125') overlayColor.style.opacity = 0.15;else if (opacity === '0.15') overlayColor.style.opacity = 0.2;else if (opacity === '0.2') overlayColor.style.opacity = 0.25;else if (opacity === '0.25') overlayColor.style.opacity = 0.3;else if (opacity === '0.3') overlayColor.style.opacity = 0.35;else if (opacity === '0.35') overlayColor.style.opacity = 0.4;else if (opacity === '0.4') overlayColor.style.opacity = 0.45;else if (opacity === '0.45') overlayColor.style.opacity = 0.5;else if (opacity === '0.5') overlayColor.style.opacity = 0.55;else if (opacity === '0.55') overlayColor.style.opacity = 0.6;else if (opacity === '0.6') overlayColor.style.opacity = 0.6;else overlayColor.style.opacity = 0.15;
|
|
10327
10377
|
}
|
|
10328
|
-
}
|
|
10329
10378
|
|
|
10330
|
-
|
|
10331
|
-
|
|
10379
|
+
if (s === '-') {
|
|
10380
|
+
// overlayColor.style.display = 'block';
|
|
10381
|
+
let opacity = overlayColor.style.opacity;
|
|
10382
|
+
if (!opacity) overlayColor.style.opacity = 0.085;else if (opacity === '0.01') {
|
|
10383
|
+
overlayColor.style.opacity = 0.01;
|
|
10384
|
+
} else if (opacity === '0.025') overlayColor.style.opacity = 0.01;else if (opacity === '0.04') overlayColor.style.opacity = 0.025;else if (opacity === '0.055') overlayColor.style.opacity = 0.04;else if (opacity === '0.07') overlayColor.style.opacity = 0.055;else if (opacity === '0.085') overlayColor.style.opacity = 0.07;else if (opacity === '0.1') overlayColor.style.opacity = 0.085;else if (opacity === '0.125') overlayColor.style.opacity = 0.1;else if (opacity === '0.15') overlayColor.style.opacity = 0.125;else if (opacity === '0.2') overlayColor.style.opacity = 0.15;else if (opacity === '0.25') overlayColor.style.opacity = 0.2;else if (opacity === '0.3') overlayColor.style.opacity = 0.25;else if (opacity === '0.35') overlayColor.style.opacity = 0.3;else if (opacity === '0.4') overlayColor.style.opacity = 0.35;else if (opacity === '0.45') overlayColor.style.opacity = 0.4;else if (opacity === '0.5') overlayColor.style.opacity = 0.45;else if (opacity === '0.55') overlayColor.style.opacity = 0.5;else if (opacity === '0.6') overlayColor.style.opacity = 0.55;else {
|
|
10385
|
+
overlayColor.style.opacity = 0.15;
|
|
10386
|
+
}
|
|
10387
|
+
}
|
|
10388
|
+
|
|
10389
|
+
if (s === '0') {
|
|
10390
|
+
// overlayColor.parentNode.removeChild(overlayColor);
|
|
10391
|
+
overlayColor.style.opacity = '0';
|
|
10392
|
+
}
|
|
10332
10393
|
}
|
|
10333
10394
|
|
|
10334
10395
|
return false;
|
|
@@ -10395,12 +10456,7 @@ class EditBox {
|
|
|
10395
10456
|
if (!overlayBg) {
|
|
10396
10457
|
overlay.insertAdjacentHTML('beforeend', '<div class="is-overlay-bg"></div>');
|
|
10397
10458
|
overlayBg = overlay.querySelector('.is-overlay-bg');
|
|
10398
|
-
}
|
|
10399
|
-
// if (!overlayColor) {
|
|
10400
|
-
// overlayBg.insertAdjacentHTML('beforeend', '<div class="is-overlay-color" style="opacity:0.1"></div>');
|
|
10401
|
-
// overlayColor = overlayBg.querySelector('.is-overlay-color');
|
|
10402
|
-
// }
|
|
10403
|
-
|
|
10459
|
+
}
|
|
10404
10460
|
|
|
10405
10461
|
overlayBg.style.backgroundImage = 'url(\'' + url + '\')';
|
|
10406
10462
|
overlayBg.style.backgroundPosition = 50 + '%' + ' ' + 60 + '%'; //default
|
|
@@ -14967,6 +15023,11 @@ class Util {
|
|
|
14967
15023
|
} // LATER: auto scroll
|
|
14968
15024
|
// LATER: If image, then it needs time to load (resulting incorrect position), so hide element tool.
|
|
14969
15025
|
|
|
15026
|
+
}
|
|
15027
|
+
|
|
15028
|
+
if (this.builder.useCssClasses) {
|
|
15029
|
+
let builderActive = document.querySelector('.builder-active');
|
|
15030
|
+
if (builderActive) dom.contentReformat(builderActive, this.builder.cssClasses);
|
|
14970
15031
|
} // Call onChange
|
|
14971
15032
|
|
|
14972
15033
|
|
|
@@ -15195,6 +15256,11 @@ class Util {
|
|
|
15195
15256
|
|
|
15196
15257
|
columnTool = document.querySelector('.is-column-tool');
|
|
15197
15258
|
columnTool.className = columnTool.className.replace('active', '');
|
|
15259
|
+
}
|
|
15260
|
+
|
|
15261
|
+
if (this.builder.useCssClasses) {
|
|
15262
|
+
let builderActive = document.querySelector('.builder-active');
|
|
15263
|
+
if (builderActive) dom.contentReformat(builderActive, this.builder.cssClasses);
|
|
15198
15264
|
} // Call onChange
|
|
15199
15265
|
|
|
15200
15266
|
|
|
@@ -18188,39 +18254,6 @@ class Dom {
|
|
|
18188
18254
|
if (!removeEmptyStyleChildren || removeEmptyStyleChildren.length <= 0) {
|
|
18189
18255
|
return;
|
|
18190
18256
|
}
|
|
18191
|
-
}
|
|
18192
|
-
|
|
18193
|
-
cleanEmptySpans(area) {
|
|
18194
|
-
let spans = area.querySelectorAll('span');
|
|
18195
|
-
const filter = Array.prototype.filter;
|
|
18196
|
-
let children = filter.call(spans, element => {
|
|
18197
|
-
return element.attributes.length === 0;
|
|
18198
|
-
}); // Remove empty spans
|
|
18199
|
-
|
|
18200
|
-
if (children && children.length > 0) {
|
|
18201
|
-
children.forEach(element => {
|
|
18202
|
-
element.outerHTML = element.innerHTML;
|
|
18203
|
-
});
|
|
18204
|
-
} // Remove spans which have empty content
|
|
18205
|
-
|
|
18206
|
-
|
|
18207
|
-
spans = area.querySelectorAll('span');
|
|
18208
|
-
filter.call(spans, element => {
|
|
18209
|
-
if (element.innerHTML === '') {
|
|
18210
|
-
element.parentNode.removeChild(element);
|
|
18211
|
-
}
|
|
18212
|
-
}); // Recheck
|
|
18213
|
-
|
|
18214
|
-
spans = area.querySelectorAll('span');
|
|
18215
|
-
children = filter.call(spans, element => {
|
|
18216
|
-
return element.attributes.length === 0;
|
|
18217
|
-
});
|
|
18218
|
-
|
|
18219
|
-
if (children && children.length > 0) {
|
|
18220
|
-
this.cleanEmptySpans(area);
|
|
18221
|
-
} else {
|
|
18222
|
-
return;
|
|
18223
|
-
}
|
|
18224
18257
|
} // Font Size stuff
|
|
18225
18258
|
|
|
18226
18259
|
|
|
@@ -18297,7 +18330,7 @@ class Dom {
|
|
|
18297
18330
|
}
|
|
18298
18331
|
});
|
|
18299
18332
|
});
|
|
18300
|
-
this.cleanUnusedSpan(elm); // causes lost selection
|
|
18333
|
+
this.cleanUnusedSpan(elm); // REVIEW (causes lost selection)
|
|
18301
18334
|
}
|
|
18302
18335
|
|
|
18303
18336
|
cleanSelection(selection) {
|
|
@@ -18309,40 +18342,148 @@ class Dom {
|
|
|
18309
18342
|
selection.selectAllChildren(span);
|
|
18310
18343
|
this.cleanElement(span);
|
|
18311
18344
|
}
|
|
18312
|
-
|
|
18345
|
+
/*
|
|
18313
18346
|
cleanUnusedSpan(span) {
|
|
18314
|
-
|
|
18315
|
-
|
|
18316
|
-
} // Direct children with no style
|
|
18317
|
-
|
|
18318
|
-
|
|
18319
|
-
const children = Array.from(span.children).filter(element => {
|
|
18320
|
-
if (element.getAttribute('style') === '' || element.style === null) {
|
|
18321
|
-
element.removeAttribute('style');
|
|
18347
|
+
if (!span.hasChildNodes()) {
|
|
18348
|
+
return;
|
|
18322
18349
|
}
|
|
18350
|
+
// Direct children with no style
|
|
18351
|
+
const children = Array.from(span.children).filter((element) => {
|
|
18352
|
+
if (element.getAttribute('style') === '' || element.style === null) {
|
|
18353
|
+
element.removeAttribute('style');
|
|
18354
|
+
}
|
|
18355
|
+
let unused = ( element.attributes.length === 0 || (element.attributes.length === 1 && element.hasAttribute('data-keep')));
|
|
18356
|
+
return (element.nodeName.toLowerCase() === 'span' && unused);
|
|
18357
|
+
});
|
|
18358
|
+
if (children && children.length > 0) {
|
|
18359
|
+
children.forEach((element) => {
|
|
18360
|
+
const text = document.createTextNode(element.textContent);
|
|
18361
|
+
element.parentElement.replaceChild(text, element);
|
|
18362
|
+
});
|
|
18363
|
+
return;
|
|
18364
|
+
}
|
|
18365
|
+
// Deeper childrens
|
|
18366
|
+
const cleanUnusedSpanChildren = Array.from(span.children).map((element) => {
|
|
18367
|
+
return this.cleanUnusedSpan(element);
|
|
18368
|
+
});
|
|
18369
|
+
if (!cleanUnusedSpanChildren || cleanUnusedSpanChildren.length <= 0) {
|
|
18370
|
+
return;
|
|
18371
|
+
}
|
|
18372
|
+
}
|
|
18373
|
+
*/
|
|
18323
18374
|
|
|
18324
|
-
|
|
18325
|
-
|
|
18326
|
-
|
|
18375
|
+
|
|
18376
|
+
cleanUnusedSpan(area) {
|
|
18377
|
+
let spans = area.querySelectorAll('span');
|
|
18378
|
+
const filter = Array.prototype.filter;
|
|
18379
|
+
let children = filter.call(spans, element => {
|
|
18380
|
+
return element.attributes.length === 0;
|
|
18381
|
+
}); // Remove empty spans
|
|
18327
18382
|
|
|
18328
18383
|
if (children && children.length > 0) {
|
|
18329
18384
|
children.forEach(element => {
|
|
18330
|
-
|
|
18331
|
-
element.parentElement.replaceChild(text, element);
|
|
18385
|
+
element.outerHTML = element.innerHTML;
|
|
18332
18386
|
});
|
|
18333
|
-
|
|
18334
|
-
} // Deeper childrens
|
|
18387
|
+
} // Remove spans which have empty content
|
|
18335
18388
|
|
|
18336
18389
|
|
|
18337
|
-
|
|
18338
|
-
|
|
18390
|
+
spans = area.querySelectorAll('span');
|
|
18391
|
+
filter.call(spans, element => {
|
|
18392
|
+
if (element.innerHTML === '') {
|
|
18393
|
+
element.parentNode.removeChild(element);
|
|
18394
|
+
}
|
|
18395
|
+
}); // Recheck
|
|
18396
|
+
|
|
18397
|
+
spans = area.querySelectorAll('span');
|
|
18398
|
+
children = filter.call(spans, element => {
|
|
18399
|
+
return element.attributes.length === 0;
|
|
18339
18400
|
});
|
|
18340
18401
|
|
|
18341
|
-
if (
|
|
18402
|
+
if (children && children.length > 0) {
|
|
18403
|
+
this.cleanUnusedSpan(area);
|
|
18404
|
+
} else {
|
|
18342
18405
|
return;
|
|
18343
18406
|
}
|
|
18344
18407
|
}
|
|
18345
18408
|
|
|
18409
|
+
contentReformat(area, cssClasses) {
|
|
18410
|
+
this.replaceTag(area, 'b', cssClasses.fontWeight.defaultBold);
|
|
18411
|
+
this.replaceTag(area, 'i', cssClasses.fontStyle.italic);
|
|
18412
|
+
this.replaceTag(area, 'u', cssClasses.textDecoration.underline);
|
|
18413
|
+
this.replaceTag(area, 'strike', cssClasses.textDecoration.linethrough);
|
|
18414
|
+
this.replaceInline(area, 'font-weight', 'normal', cssClasses.fontWeight.defaultBold);
|
|
18415
|
+
this.replaceInline(area, 'font-weight', 'bold', cssClasses.fontWeight.defaultBold);
|
|
18416
|
+
this.replaceInline(area, 'font-weight', '600', cssClasses.fontWeight.semibold);
|
|
18417
|
+
this.replaceInline(area, 'text-align', 'left', cssClasses.textAlign.left);
|
|
18418
|
+
this.replaceInline(area, 'text-align', 'right', cssClasses.textAlign.right);
|
|
18419
|
+
this.replaceInline(area, 'text-align', 'center', cssClasses.textAlign.center);
|
|
18420
|
+
this.replaceInline(area, 'text-align', 'justify', cssClasses.textAlign.justify);
|
|
18421
|
+
this.replaceInline(area, 'display', 'flex', cssClasses.display.flex);
|
|
18422
|
+
this.replaceInline(area, 'justiify-content', 'flex-start', cssClasses.justifyContent.start);
|
|
18423
|
+
this.replaceInline(area, 'justiify-content', 'flex-end', cssClasses.justifyContent.end);
|
|
18424
|
+
this.replaceInline(area, 'justiify-content', 'center', cssClasses.justifyContent.center);
|
|
18425
|
+
this.replaceInline(area, 'justiify-content', 'space-between', cssClasses.justifyContent.between);
|
|
18426
|
+
this.replaceInline(area, 'flex-direction', 'column', cssClasses.flexDirection.column);
|
|
18427
|
+
this.replaceInline(area, 'flex-direction', 'row', cssClasses.flexDirection.row);
|
|
18428
|
+
this.replaceInline(area, 'align-items', 'flex-start', cssClasses.alignItems.start);
|
|
18429
|
+
this.replaceInline(area, 'align-items', 'flex-end', cssClasses.alignItems.end);
|
|
18430
|
+
this.replaceInline(area, 'align-items', 'center', cssClasses.alignItems.center);
|
|
18431
|
+
this.replaceInline(area, 'text-transform', 'uppercase', cssClasses.textTransform.uppercase);
|
|
18432
|
+
this.replaceInline(area, 'text-transform', 'lowercase', cssClasses.textTransform.lowercase);
|
|
18433
|
+
this.replaceInline(area, 'text-transform', 'none', cssClasses.textTransform.normal);
|
|
18434
|
+
this.replaceInline(area, 'line-height', '1', cssClasses.leading.leading_10);
|
|
18435
|
+
this.replaceInline(area, 'line-height', '1.1', cssClasses.leading.leading_11);
|
|
18436
|
+
this.replaceInline(area, 'line-height', '1.2', cssClasses.leading.leading_12);
|
|
18437
|
+
this.replaceInline(area, 'line-height', '1.25', cssClasses.leading.leading_125);
|
|
18438
|
+
this.replaceInline(area, 'line-height', '1.3', cssClasses.leading.leading_13);
|
|
18439
|
+
this.replaceInline(area, 'line-height', '1.375', cssClasses.leading.leading_1375);
|
|
18440
|
+
this.replaceInline(area, 'line-height', '1.4', cssClasses.leading.leading_14);
|
|
18441
|
+
this.replaceInline(area, 'line-height', '1.5', cssClasses.leading.leading_15);
|
|
18442
|
+
this.replaceInline(area, 'line-height', '1.6', cssClasses.leading.leading_16);
|
|
18443
|
+
this.replaceInline(area, 'line-height', '1.625', cssClasses.leading.leading_1625);
|
|
18444
|
+
this.replaceInline(area, 'line-height', '1.7', cssClasses.leading.leading_17);
|
|
18445
|
+
this.replaceInline(area, 'line-height', '1.8', cssClasses.leading.leading_18);
|
|
18446
|
+
this.replaceInline(area, 'line-height', '1.9', cssClasses.leading.leading_19);
|
|
18447
|
+
this.replaceInline(area, 'line-height', '2', cssClasses.leading.leading_20);
|
|
18448
|
+
this.replaceInline(area, 'line-height', '2.1', cssClasses.leading.leading_21);
|
|
18449
|
+
this.replaceInline(area, 'line-height', '2.2', cssClasses.leading.leading_22);
|
|
18450
|
+
}
|
|
18451
|
+
|
|
18452
|
+
replaceTag(area, tag, className) {
|
|
18453
|
+
let elms = area.querySelectorAll(tag);
|
|
18454
|
+
const filter = Array.prototype.filter;
|
|
18455
|
+
let children = filter.call(elms, element => {
|
|
18456
|
+
return element.attributes.length === 0;
|
|
18457
|
+
});
|
|
18458
|
+
|
|
18459
|
+
if (children && children.length > 0) {
|
|
18460
|
+
children.forEach(element => {
|
|
18461
|
+
const span = document.createElement('span');
|
|
18462
|
+
span.setAttribute('class', className);
|
|
18463
|
+
span.innerHTML = element.innerHTML;
|
|
18464
|
+
element.outerHTML = span.outerHTML;
|
|
18465
|
+
});
|
|
18466
|
+
}
|
|
18467
|
+
}
|
|
18468
|
+
|
|
18469
|
+
replaceInline(builder, css, value, className) {
|
|
18470
|
+
let elms = builder.querySelectorAll('*');
|
|
18471
|
+
elms.forEach(elm => {
|
|
18472
|
+
if (css === 'justiify-content') {
|
|
18473
|
+
/*
|
|
18474
|
+
For some reason, cannot use elm.style[css] for 'justify-content'
|
|
18475
|
+
*/
|
|
18476
|
+
if (elm.style.justifyContent === `${value}`) {
|
|
18477
|
+
this.addClass(elm, className);
|
|
18478
|
+
elm.style.justifyContent = '';
|
|
18479
|
+
}
|
|
18480
|
+
} else if (elm.style[css] === `${value}`) {
|
|
18481
|
+
this.addClass(elm, className);
|
|
18482
|
+
elm.style[css] = '';
|
|
18483
|
+
}
|
|
18484
|
+
});
|
|
18485
|
+
}
|
|
18486
|
+
|
|
18346
18487
|
}
|
|
18347
18488
|
|
|
18348
18489
|
var js$1 = {exports: {}};
|
|
@@ -23912,7 +24053,7 @@ class HtmlUtil {
|
|
|
23912
24053
|
} // Clean unused spans
|
|
23913
24054
|
|
|
23914
24055
|
|
|
23915
|
-
dom$I.cleanUnusedSpan(content);
|
|
24056
|
+
dom$I.cleanUnusedSpan(content); // REVIEW
|
|
23916
24057
|
}
|
|
23917
24058
|
|
|
23918
24059
|
const util = this.builder.util;
|
|
@@ -76567,12 +76708,6 @@ class ContentBuilder {
|
|
|
76567
76708
|
defaultBold: 'font-semibold',
|
|
76568
76709
|
defaultNormal: 'font-light'
|
|
76569
76710
|
},
|
|
76570
|
-
textAlign: {
|
|
76571
|
-
left: 'text-left',
|
|
76572
|
-
center: 'text-center',
|
|
76573
|
-
right: 'text-right',
|
|
76574
|
-
justify: 'text-justify'
|
|
76575
|
-
},
|
|
76576
76711
|
fontStyle: {
|
|
76577
76712
|
italic: 'italic',
|
|
76578
76713
|
normal: 'not-italic'
|
|
@@ -76646,6 +76781,34 @@ class ContentBuilder {
|
|
|
76646
76781
|
leading_29: 'leading-29',
|
|
76647
76782
|
leading_30: 'leading-30'
|
|
76648
76783
|
},
|
|
76784
|
+
opacity: {
|
|
76785
|
+
opacity_0: 'opacity-0',
|
|
76786
|
+
opacity_2: 'opacity-2',
|
|
76787
|
+
opacity_4: 'opacity-4',
|
|
76788
|
+
opacity_5: 'opacity-5',
|
|
76789
|
+
opacity_6: 'opacity-6',
|
|
76790
|
+
opacity_8: 'opacity-8',
|
|
76791
|
+
opacity_10: 'opacity-10',
|
|
76792
|
+
opacity_12: 'opacity-12',
|
|
76793
|
+
opacity_15: 'opacity-15',
|
|
76794
|
+
opacity_20: 'opacity-20',
|
|
76795
|
+
opacity_25: 'opacity-25',
|
|
76796
|
+
opacity_30: 'opacity-30',
|
|
76797
|
+
opacity_35: 'opacity-35',
|
|
76798
|
+
opacity_40: 'opacity-40',
|
|
76799
|
+
opacity_45: 'opacity-45',
|
|
76800
|
+
opacity_50: 'opacity-50',
|
|
76801
|
+
opacity_55: 'opacity-55',
|
|
76802
|
+
opacity_60: 'opacity-60',
|
|
76803
|
+
opacity_65: 'opacity-65',
|
|
76804
|
+
opacity_70: 'opacity-70',
|
|
76805
|
+
opacity_75: 'opacity-75',
|
|
76806
|
+
opacity_80: 'opacity-80',
|
|
76807
|
+
opacity_85: 'opacity-85',
|
|
76808
|
+
opacity_90: 'opacity-90',
|
|
76809
|
+
opacity_95: 'opacity-95',
|
|
76810
|
+
opacity_100: 'opacity-100'
|
|
76811
|
+
},
|
|
76649
76812
|
padding: {
|
|
76650
76813
|
all: {
|
|
76651
76814
|
p_0: 'p-0',
|
|
@@ -76778,6 +76941,12 @@ class ContentBuilder {
|
|
|
76778
76941
|
superscript: 'sup',
|
|
76779
76942
|
subscript: 'sub'
|
|
76780
76943
|
},
|
|
76944
|
+
textAlign: {
|
|
76945
|
+
left: 'text-left',
|
|
76946
|
+
center: 'text-center',
|
|
76947
|
+
right: 'text-right',
|
|
76948
|
+
justify: 'text-justify'
|
|
76949
|
+
},
|
|
76781
76950
|
display: {
|
|
76782
76951
|
flex: 'flex',
|
|
76783
76952
|
block: 'block',
|
|
@@ -76811,7 +76980,7 @@ class ContentBuilder {
|
|
|
76811
76980
|
stretch: 'items-stretch'
|
|
76812
76981
|
}
|
|
76813
76982
|
},
|
|
76814
|
-
useCssClasses:
|
|
76983
|
+
useCssClasses: true,
|
|
76815
76984
|
useButtonPlugin: false
|
|
76816
76985
|
}; // obj.preserveSelection = true; (can be set programmatically) to prevent click that clears selection on external custom modal.
|
|
76817
76986
|
|
|
@@ -77309,6 +77478,8 @@ class ContentBuilder {
|
|
|
77309
77478
|
const builders = document.querySelectorAll(this.opts.container);
|
|
77310
77479
|
Array.prototype.forEach.call(builders, builder => {
|
|
77311
77480
|
this.applyBehaviorOn(builder); // includes setZoomOnControl
|
|
77481
|
+
|
|
77482
|
+
this.contentReformatOn(builder);
|
|
77312
77483
|
}); // Call onRender to indicate content is ready for editing (applyBehavior has been applied)
|
|
77313
77484
|
|
|
77314
77485
|
this.opts.onRender();
|
|
@@ -77316,6 +77487,10 @@ class ContentBuilder {
|
|
|
77316
77487
|
} // applyBehavior
|
|
77317
77488
|
|
|
77318
77489
|
|
|
77490
|
+
contentReformatOn(builder) {
|
|
77491
|
+
if (this.opts.useCssClasses) dom$J.contentReformat(builder, this.opts.cssClasses);
|
|
77492
|
+
}
|
|
77493
|
+
|
|
77319
77494
|
applyBehaviorOn(builder) {
|
|
77320
77495
|
const util = this.util; //Make absolute
|
|
77321
77496
|
|
|
@@ -80861,7 +81036,6 @@ class ContentBox {
|
|
|
80861
81036
|
undoContainerOnly: false,
|
|
80862
81037
|
absolutePath: false,
|
|
80863
81038
|
maxEmbedImageWidth: 1600,
|
|
80864
|
-
useCssClasses: false,
|
|
80865
81039
|
zoom: 0.6,
|
|
80866
81040
|
contentStyleWithSample: false,
|
|
80867
81041
|
contentSizes: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 970, 980, 1000, 1020, 1040, 1050, 1060, 1080, 1100, 1120, 1140, 1160, 1180, 1200, 1220, 1240, 1260, 1280, 1300, 1320, 1340, 1360, 1380, 1400, 1420, 1440, 1460, 1480, 1500, 1520, 1540, 1560, 1580, 1600, 1620, 1640, 1660, 1680, 1700, 1720, 1740, 1760, 1780, 1800, 1820, 1840, 1860, 1880, 1900, 1920, 1940, 1960, 1980, 2000, 2020, 2040, 2060, 2080, 2100, 2120, 2140, 2160, 2180, 2200, 2220, 2240, 2260, 2280, 2300, 2320, 2340, 2360, 2380, 2400, 2420, 2440, 2460, 2480, 2500, 2520, 2540, 2560, 2580, 2600, 2620, 2640, 2660, 2680, 2700],
|
|
@@ -82812,6 +82986,294 @@ class ContentBox {
|
|
|
82812
82986
|
}
|
|
82813
82987
|
},
|
|
82814
82988
|
cssInBody: false,
|
|
82989
|
+
cssClasses: {
|
|
82990
|
+
fontWeight: {
|
|
82991
|
+
thin: 'font-thin',
|
|
82992
|
+
extralight: 'font-extralight',
|
|
82993
|
+
light: 'font-light',
|
|
82994
|
+
normal: 'font-normal',
|
|
82995
|
+
medium: 'font-medium',
|
|
82996
|
+
semibold: 'font-semibold',
|
|
82997
|
+
bold: 'font-bold',
|
|
82998
|
+
extrabold: 'font-extrabold',
|
|
82999
|
+
black: 'font-black',
|
|
83000
|
+
defaultBold: 'font-semibold',
|
|
83001
|
+
defaultNormal: 'font-light'
|
|
83002
|
+
},
|
|
83003
|
+
fontStyle: {
|
|
83004
|
+
italic: 'italic',
|
|
83005
|
+
normal: 'not-italic'
|
|
83006
|
+
},
|
|
83007
|
+
textDecoration: {
|
|
83008
|
+
underline: 'underline',
|
|
83009
|
+
linethrough: 'line-through',
|
|
83010
|
+
normal: 'no-underline'
|
|
83011
|
+
},
|
|
83012
|
+
textTransform: {
|
|
83013
|
+
uppercase: 'uppercase',
|
|
83014
|
+
lowercase: 'lowercase',
|
|
83015
|
+
capitalize: 'capitalize',
|
|
83016
|
+
normal: 'normal-case'
|
|
83017
|
+
},
|
|
83018
|
+
tracking: {
|
|
83019
|
+
tracking__100: 'tracking--100',
|
|
83020
|
+
tracking__075: 'tracking--75',
|
|
83021
|
+
tracking__050: 'tracking-tighter',
|
|
83022
|
+
tracking__025: 'tracking-tight',
|
|
83023
|
+
tracking_000: 'tracking-normal',
|
|
83024
|
+
tracking_025: 'tracking-wide',
|
|
83025
|
+
tracking_050: 'tracking-wider',
|
|
83026
|
+
tracking_075: 'tracking-75',
|
|
83027
|
+
tracking_100: 'tracking-widest',
|
|
83028
|
+
tracking_125: 'tracking-125',
|
|
83029
|
+
tracking_150: 'tracking-150',
|
|
83030
|
+
tracking_175: 'tracking-175',
|
|
83031
|
+
tracking_200: 'tracking-200',
|
|
83032
|
+
tracking_225: 'tracking-225',
|
|
83033
|
+
tracking_250: 'tracking-250',
|
|
83034
|
+
tracking_275: 'tracking-275',
|
|
83035
|
+
tracking_300: 'tracking-300',
|
|
83036
|
+
tracking_325: 'tracking-325',
|
|
83037
|
+
tracking_350: 'tracking-350',
|
|
83038
|
+
tracking_375: 'tracking-375',
|
|
83039
|
+
tracking_400: 'tracking-400',
|
|
83040
|
+
tracking_425: 'tracking-425',
|
|
83041
|
+
tracking_450: 'tracking-450',
|
|
83042
|
+
tracking_475: 'tracking-475',
|
|
83043
|
+
tracking_500: 'tracking-500'
|
|
83044
|
+
},
|
|
83045
|
+
leading: {
|
|
83046
|
+
leading_5: 'leading-05',
|
|
83047
|
+
leading_6: 'leading-06',
|
|
83048
|
+
leading_7: 'leading-07',
|
|
83049
|
+
leading_8: 'leading-08',
|
|
83050
|
+
leading_9: 'leading-09',
|
|
83051
|
+
leading_10: 'leading-none',
|
|
83052
|
+
leading_11: 'leading-11',
|
|
83053
|
+
leading_12: 'leading-12',
|
|
83054
|
+
leading_125: 'leading-tight',
|
|
83055
|
+
leading_13: 'leading-13',
|
|
83056
|
+
leading_1375: 'leading-snug',
|
|
83057
|
+
leading_14: 'leading-14',
|
|
83058
|
+
leading_15: 'leading-normal',
|
|
83059
|
+
leading_16: 'leading-16',
|
|
83060
|
+
leading_1625: 'leading-relaxed',
|
|
83061
|
+
leading_17: 'leading-17',
|
|
83062
|
+
leading_18: 'leading-18',
|
|
83063
|
+
leading_19: 'leading-19',
|
|
83064
|
+
leading_20: 'leading-loose',
|
|
83065
|
+
leading_21: 'leading-21',
|
|
83066
|
+
leading_22: 'leading-22',
|
|
83067
|
+
leading_23: 'leading-23',
|
|
83068
|
+
leading_24: 'leading-24',
|
|
83069
|
+
leading_25: 'leading-25',
|
|
83070
|
+
leading_26: 'leading-26',
|
|
83071
|
+
leading_27: 'leading-27',
|
|
83072
|
+
leading_28: 'leading-28',
|
|
83073
|
+
leading_29: 'leading-29',
|
|
83074
|
+
leading_30: 'leading-30'
|
|
83075
|
+
},
|
|
83076
|
+
opacity: {
|
|
83077
|
+
opacity_0: 'opacity-0',
|
|
83078
|
+
opacity_2: 'opacity-2',
|
|
83079
|
+
opacity_4: 'opacity-4',
|
|
83080
|
+
opacity_5: 'opacity-5',
|
|
83081
|
+
opacity_6: 'opacity-6',
|
|
83082
|
+
opacity_8: 'opacity-8',
|
|
83083
|
+
opacity_10: 'opacity-10',
|
|
83084
|
+
opacity_12: 'opacity-12',
|
|
83085
|
+
opacity_15: 'opacity-15',
|
|
83086
|
+
opacity_20: 'opacity-20',
|
|
83087
|
+
opacity_25: 'opacity-25',
|
|
83088
|
+
opacity_30: 'opacity-30',
|
|
83089
|
+
opacity_35: 'opacity-35',
|
|
83090
|
+
opacity_40: 'opacity-40',
|
|
83091
|
+
opacity_45: 'opacity-45',
|
|
83092
|
+
opacity_50: 'opacity-50',
|
|
83093
|
+
opacity_55: 'opacity-55',
|
|
83094
|
+
opacity_60: 'opacity-60',
|
|
83095
|
+
opacity_65: 'opacity-65',
|
|
83096
|
+
opacity_70: 'opacity-70',
|
|
83097
|
+
opacity_75: 'opacity-75',
|
|
83098
|
+
opacity_80: 'opacity-80',
|
|
83099
|
+
opacity_85: 'opacity-85',
|
|
83100
|
+
opacity_90: 'opacity-90',
|
|
83101
|
+
opacity_95: 'opacity-95',
|
|
83102
|
+
opacity_100: 'opacity-100'
|
|
83103
|
+
},
|
|
83104
|
+
padding: {
|
|
83105
|
+
all: {
|
|
83106
|
+
p_0: 'p-0',
|
|
83107
|
+
p_1: 'p-1',
|
|
83108
|
+
p_2: 'p-2',
|
|
83109
|
+
p_3: 'p-3',
|
|
83110
|
+
p_4: 'p-4',
|
|
83111
|
+
p_5: 'p-5',
|
|
83112
|
+
p_6: 'p-6',
|
|
83113
|
+
p_7: 'p-7',
|
|
83114
|
+
p_8: 'p-8',
|
|
83115
|
+
p_9: 'p-9',
|
|
83116
|
+
p_10: 'p-10',
|
|
83117
|
+
p_11: 'p-11',
|
|
83118
|
+
p_12: 'p-12',
|
|
83119
|
+
p_14: 'p-14',
|
|
83120
|
+
p_16: 'p-16',
|
|
83121
|
+
p_20: 'p-20'
|
|
83122
|
+
},
|
|
83123
|
+
x: {
|
|
83124
|
+
px_0: 'px-0',
|
|
83125
|
+
px_1: 'px-1',
|
|
83126
|
+
px_2: 'px-2',
|
|
83127
|
+
px_3: 'px-3',
|
|
83128
|
+
px_4: 'px-4',
|
|
83129
|
+
px_5: 'px-5',
|
|
83130
|
+
px_6: 'px-6',
|
|
83131
|
+
px_7: 'px-7',
|
|
83132
|
+
px_8: 'px-8',
|
|
83133
|
+
px_9: 'px-9',
|
|
83134
|
+
px_10: 'px-10',
|
|
83135
|
+
px_11: 'px-11',
|
|
83136
|
+
px_12: 'px-12',
|
|
83137
|
+
px_14: 'px-14',
|
|
83138
|
+
px_16: 'px-16',
|
|
83139
|
+
px_20: 'px-20'
|
|
83140
|
+
},
|
|
83141
|
+
y: {
|
|
83142
|
+
py_0: 'py-0',
|
|
83143
|
+
py_1: 'py-1',
|
|
83144
|
+
py_2: 'py-2',
|
|
83145
|
+
py_3: 'py-3',
|
|
83146
|
+
py_4: 'py-4',
|
|
83147
|
+
py_5: 'py-5',
|
|
83148
|
+
py_6: 'py-6',
|
|
83149
|
+
py_7: 'py-7',
|
|
83150
|
+
py_8: 'py-8',
|
|
83151
|
+
py_9: 'py-9',
|
|
83152
|
+
py_10: 'py-10',
|
|
83153
|
+
py_11: 'py-11',
|
|
83154
|
+
py_12: 'py-12',
|
|
83155
|
+
py_14: 'py-14',
|
|
83156
|
+
py_16: 'py-16',
|
|
83157
|
+
py_20: 'py-20'
|
|
83158
|
+
},
|
|
83159
|
+
top: {
|
|
83160
|
+
pt_0: 'pt-0',
|
|
83161
|
+
pt_1: 'pt-1',
|
|
83162
|
+
pt_2: 'pt-2',
|
|
83163
|
+
pt_3: 'pt-3',
|
|
83164
|
+
pt_4: 'pt-4',
|
|
83165
|
+
pt_5: 'pt-5',
|
|
83166
|
+
pt_6: 'pt-6',
|
|
83167
|
+
pt_7: 'pt-7',
|
|
83168
|
+
pt_8: 'pt-8',
|
|
83169
|
+
pt_9: 'pt-9',
|
|
83170
|
+
pt_10: 'pt-10',
|
|
83171
|
+
pt_11: 'pt-11',
|
|
83172
|
+
pt_12: 'pt-12',
|
|
83173
|
+
pt_14: 'pt-14',
|
|
83174
|
+
pt_16: 'pt-16',
|
|
83175
|
+
pt_20: 'pt-20'
|
|
83176
|
+
},
|
|
83177
|
+
right: {
|
|
83178
|
+
pr_0: 'pr-0',
|
|
83179
|
+
pr_1: 'pr-1',
|
|
83180
|
+
pr_2: 'pr-2',
|
|
83181
|
+
pr_3: 'pr-3',
|
|
83182
|
+
pr_4: 'pr-4',
|
|
83183
|
+
pr_5: 'pr-5',
|
|
83184
|
+
pr_6: 'pr-6',
|
|
83185
|
+
pr_7: 'pr-7',
|
|
83186
|
+
pr_8: 'pr-8',
|
|
83187
|
+
pr_9: 'pr-9',
|
|
83188
|
+
pr_10: 'pr-10',
|
|
83189
|
+
pr_11: 'pr-11',
|
|
83190
|
+
pr_12: 'pr-12',
|
|
83191
|
+
pr_14: 'pr-14',
|
|
83192
|
+
pr_16: 'pr-16',
|
|
83193
|
+
pr_20: 'pr-20'
|
|
83194
|
+
},
|
|
83195
|
+
bottom: {
|
|
83196
|
+
pb_0: 'pb-0',
|
|
83197
|
+
pb_1: 'pb-1',
|
|
83198
|
+
pb_2: 'pb-2',
|
|
83199
|
+
pb_3: 'pb-3',
|
|
83200
|
+
pb_4: 'pb-4',
|
|
83201
|
+
pb_5: 'pb-5',
|
|
83202
|
+
pb_6: 'pb-6',
|
|
83203
|
+
pb_7: 'pb-7',
|
|
83204
|
+
pb_8: 'pb-8',
|
|
83205
|
+
pb_9: 'pb-9',
|
|
83206
|
+
pb_10: 'pb-10',
|
|
83207
|
+
pb_11: 'pb-11',
|
|
83208
|
+
pb_12: 'pb-12',
|
|
83209
|
+
pb_14: 'pb-14',
|
|
83210
|
+
pb_16: 'pb-16',
|
|
83211
|
+
pb_20: 'pb-20'
|
|
83212
|
+
},
|
|
83213
|
+
left: {
|
|
83214
|
+
pl_0: 'pl-0',
|
|
83215
|
+
pl_1: 'pl-1',
|
|
83216
|
+
pl_2: 'pl-2',
|
|
83217
|
+
pl_3: 'pl-3',
|
|
83218
|
+
pl_4: 'pl-4',
|
|
83219
|
+
pl_5: 'pl-5',
|
|
83220
|
+
pl_6: 'pl-6',
|
|
83221
|
+
pl_7: 'pl-7',
|
|
83222
|
+
pl_8: 'pl-8',
|
|
83223
|
+
pl_9: 'pl-9',
|
|
83224
|
+
pl_10: 'pl-10',
|
|
83225
|
+
pl_11: 'pl-11',
|
|
83226
|
+
pl_12: 'pl-12',
|
|
83227
|
+
pl_14: 'pl-14',
|
|
83228
|
+
pl_16: 'pl-16',
|
|
83229
|
+
pl_20: 'pl-20'
|
|
83230
|
+
}
|
|
83231
|
+
},
|
|
83232
|
+
extend: {
|
|
83233
|
+
superscript: 'sup',
|
|
83234
|
+
subscript: 'sub'
|
|
83235
|
+
},
|
|
83236
|
+
textAlign: {
|
|
83237
|
+
left: 'text-left',
|
|
83238
|
+
center: 'text-center',
|
|
83239
|
+
right: 'text-right',
|
|
83240
|
+
justify: 'text-justify'
|
|
83241
|
+
},
|
|
83242
|
+
display: {
|
|
83243
|
+
flex: 'flex',
|
|
83244
|
+
block: 'block',
|
|
83245
|
+
inline: 'inline',
|
|
83246
|
+
inline_block: 'inline-block'
|
|
83247
|
+
},
|
|
83248
|
+
flexDirection: {
|
|
83249
|
+
row: 'flex-row',
|
|
83250
|
+
column: 'flex-col',
|
|
83251
|
+
row_reverse: 'flex-row-reverse',
|
|
83252
|
+
column_reverse: 'flex-col-reverse'
|
|
83253
|
+
},
|
|
83254
|
+
flexWrap: {
|
|
83255
|
+
wrap: 'flex-wrap',
|
|
83256
|
+
nowrap: 'flex-nowrap',
|
|
83257
|
+
wrap_reverse: 'flex-wrap-reverse'
|
|
83258
|
+
},
|
|
83259
|
+
justifyContent: {
|
|
83260
|
+
start: 'justify-start',
|
|
83261
|
+
end: 'justify-end',
|
|
83262
|
+
center: 'justify-center',
|
|
83263
|
+
between: 'justify-between',
|
|
83264
|
+
around: 'justify-around',
|
|
83265
|
+
evenly: 'justify-evenly'
|
|
83266
|
+
},
|
|
83267
|
+
alignItems: {
|
|
83268
|
+
start: 'items-start',
|
|
83269
|
+
end: 'items-end',
|
|
83270
|
+
center: 'items-center',
|
|
83271
|
+
baseline: 'items-baseline',
|
|
83272
|
+
stretch: 'items-stretch'
|
|
83273
|
+
}
|
|
83274
|
+
},
|
|
83275
|
+
useCssClasses: true,
|
|
83276
|
+
useButtonPlugin: false,
|
|
82815
83277
|
|
|
82816
83278
|
/* Old Version (backward compatible) */
|
|
82817
83279
|
onAddSectionOpen: function () {},
|
|
@@ -83036,7 +83498,9 @@ class ContentBox {
|
|
|
83036
83498
|
},
|
|
83037
83499
|
undoContainerOnly: this.settings.undoContainerOnly,
|
|
83038
83500
|
absolutePath: this.settings.absolutePath,
|
|
83501
|
+
cssClasses: this.settings.cssClasses,
|
|
83039
83502
|
useCssClasses: this.settings.useCssClasses,
|
|
83503
|
+
useButtonPlugin: this.settings.useButtonPlugin,
|
|
83040
83504
|
zoom: this.settings.zoom,
|
|
83041
83505
|
onZoomStart: () => {
|
|
83042
83506
|
// const wrapper = this.wrapperEl;
|