quill-html-edit-button
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -1,2 +0,2 @@ | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=0)}([function(t,e,n){"use strict";function r(t){return document.createElement(t)}n.r(e),n.d(e,"htmlEditButton",(function(){return l}));var o=!1,i={prefixString:function(){return"</> quill-html-edit-button: "},get log(){return o?console.log.bind(console,this.prefixString()):function(){}}},l=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o=n&&n.debug,i.log("logging enabled");var l=e.container.parentElement.querySelectorAll(".ql-toolbar");(l=[].slice.call(l)).forEach((function(t){var n=r("span");n.setAttribute("class","ql-formats");var o=r("button");o.innerHTML="<>",o.title="Show HTML source",o.onclick=function(t){t.preventDefault(),function(t){var e=t.container.querySelector(".ql-editor").innerHTML,n=r("div"),o=r("div");o.setAttribute("style","background: #0000007d; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;"),n.setAttribute("style","background: #ddd; position: absolute; top: 5%; left: 5%; right: 5%; bottom: 5%; border-radius: 10px;");var l=r("i");l.setAttribute("style","margin: 0; display: block;"),l.innerText='Edit HTML here, when you click "OK" the quill editor\'s contents will be replaced';var u=r("div");u.appendChild(l),u.setAttribute("style","position: relative; width: calc(100% - 40px); height: calc(100% - 40px); padding: 20px;");var a=r("textarea");a.setAttribute("style","position: absolute; left:15px; width: calc(100% - 45px); height: calc(100% - 116px);"),a.value=function(t){for(var e=" ".repeat(2),n=0,r=null,o=null,l="",u=0;u<=t.length;u++){r=t.substr(u,1),o=t.substr(u+1,1);var a="<br>"===t.substr(u,4),c="<"===r&&"/"===o&&!a;a&&(l+="\n",n--,u+=4),"<"===r&&"/"!==o&&!a?(l+="\n"+e.repeat(n),n++):c?(--n<0&&(n=0),l+="\n"+e.repeat(n)):(" "===r&&" "===o||"\n"===r&&""===t.substr(u,t.substr(u).indexOf("<")).trim())&&(r=""),l+=r}return i.log("formatHTML",{before:t,after:l}),l}(e);var c=r("button");c.innerHTML="Cancel",c.setAttribute("style","margin-right: 20px;");var d=r("button");d.innerHTML="Ok";var p=r("div");p.setAttribute("style","position: absolute; bottom: 20px; transform: scale(1.5); left: calc(50% - 60px)"),p.appendChild(c),p.appendChild(d),u.appendChild(a),u.appendChild(p),n.appendChild(u),o.appendChild(n),document.body.appendChild(o),c.onclick=function(){document.body.removeChild(o)},o.onclick=c.onclick,n.onclick=function(t){t.preventDefault(),t.stopPropagation()},d.onclick=function(){var e=a.value.split(/\r?\n/g).map((function(t){return t.trim()})).join("");t.container.querySelector(".ql-editor").innerHTML=e,document.body.removeChild(o)}}(e)},n.appendChild(o),t.appendChild(n)}))};window.htmlEditButton=l,e.default=l}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vc3JjL3F1aWxsLmh0bWxFZGl0QnV0dG9uLmpzIl0sIm5hbWVzIjpbImluc3RhbGxlZE1vZHVs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N1bHRcbiAgfSk7XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbndpbmRvdy5odG1sRWRpdEJ1dHRvbiA9IGh0bWxFZGl0QnV0dG9uO1xuZXhwb3J0IGRlZmF1bHQgaHRtbEVkaXRCdXR0b247XG5leHBvcnQgeyBodG1sRWRpdEJ1dHRvbiB9O1xuIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/dist/",e(e.s=0)}([function(t,n,e){"use strict";e.r(n),e.d(n,"htmlEditButton",(function(){return l}));e(1);function r(t){return document.createElement(t)}function o(t,n,e){return t.setAttribute(n,e)}var i=!1,a={prefixString:function(){return"</> quill-html-edit-button: "},get log(){return i?console.log.bind(console,this.prefixString()):function(){}}},l=function t(n,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),i=e&&e.debug,a.log("logging enabled");var l=n.container.parentElement.querySelectorAll(".ql-toolbar");(l=[].slice.call(l)).forEach((function(t){var e=r("span");o(e,"class","ql-formats");var i=r("button");i.innerHTML="<>",i.title="Show HTML source",i.onclick=function(t){t.preventDefault(),function(t){var n=t.container.querySelector(".ql-editor").innerHTML,e=r("div"),i=r("div");o(i,"class","ql-html-overlayContainer"),o(e,"class","ql-html-popupContainer");var l=r("i");o(l,"class","ql-html-popupTitle"),l.innerText='Edit HTML here, when you click "OK" the quill editor\'s contents will be replaced';var s=r("div");s.appendChild(l),o(s,"class","ql-html-textContainer");var u=r("textarea");o(u,"class","ql-html-textArea"),u.value=function(t){for(var n=" ".repeat(2),e=0,r=null,o=null,i="",l=0;l<=t.length;l++){r=t.substr(l,1),o=t.substr(l+1,1);var s="<br>"===t.substr(l,4),u="<"===r&&"/"===o&&!s;s&&(i+="\n",e--,l+=4),"<"===r&&"/"!==o&&!s?(i+="\n"+n.repeat(e),e++):u?(--e<0&&(e=0),i+="\n"+n.repeat(e)):(" "===r&&" "===o||"\n"===r&&""===t.substr(l,t.substr(l).indexOf("<")).trim())&&(r=""),i+=r}return a.log("formatHTML",{before:t,after:i}),i}(n);var c=r("button");c.innerHTML="Cancel",o(c,"class","ql-html-buttonCancel");var f=r("button");f.innerHTML="Ok";var p=r("div");o(p,"class","ql-html-buttonGroup"),p.appendChild(c),p.appendChild(f),s.appendChild(u),s.appendChild(p),e.appendChild(s),i.appendChild(e),document.body.appendChild(i),c.onclick=function(){document.body.removeChild(i)},i.onclick=c.onclick,e.onclick=function(t){t.preventDefault(),t.stopPropagation()},f.onclick=function(){var n=u.value.split(/\r?\n/g).map((function(t){return t.trim()})).join("");t.container.querySelector(".ql-editor").innerHTML=n,document.body.removeChild(i)}}(n)},e.appendChild(i),t.appendChild(e)}))};window.htmlEditButton=l,n.default=l},function(t,n,e){var r=e(2);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0};e(4)(r,o);r.locals&&(t.exports=r.locals)},function(t,n,e){(t.exports=e(3)(!1)).push([t.i,".ql-html-overlayContainer {\n background: #0000007d;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n}\n\n.ql-html-popupContainer {\n background: #ddd;\n position: absolute;\n top: 5%;\n left: 5%;\n right: 5%;\n bottom: 5%;\n border-radius: 10px;\n}\n\n.ql-html-textContainer {\n position: relative;\n width: calc(100% - 40px);\n height: calc(100% - 40px);\n padding: 20px;\n}\n\n.ql-html-textArea {\n position: absolute;\n left: 15px;\n width: calc(100% - 45px);\n height: calc(100% - 116px);\n}\n\n.ql-html-buttonCancel {\n margin-right: 20px;\n}\n\n.ql-html-popupTitle {\n margin: 0;\n display: block;\n}\n\n.ql-html-buttonGroup {\n position: absolute;\n bottom: 20px;\n transform: scale(1.5);\n left: calc(50% - 60px);\n}\n",""])},function(t,n){t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e=function(t,n){var e=t[1]||"",r=t[3];if(!r)return e;if(n&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[e].concat(i).concat([o]).join("\n")}var a;return[e].join("\n")}(n,t);return n[2]?"@media "+n[2]+"{"+e+"}":e})).join("")},n.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(e&&!a[2]?a[2]=e:e&&(a[2]="("+a[2]+") and ("+e+")"),n.push(a))}},n}},function(t,n,e){var r,o,i={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),l=function(t){var n={};return function(e){if(void 0===n[e]){var r=t.call(this,e);if(r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}n[e]=r}return n[e]}}((function(t){return document.querySelector(t)})),s=null,u=0,c=[],f=e(5);function p(t,n){for(var e=0;e<t.length;e++){var r=t[e],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(g(r.parts[a],n))}else{var l=[];for(a=0;a<r.parts.length;a++)l.push(g(r.parts[a],n));i[r.id]={id:r.id,refs:1,parts:l}}}}function d(t,n){for(var e=[],r={},o=0;o<t.length;o++){var i=t[o],a=n.base?i[0]+n.base:i[0],l={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(l):e.push(r[a]={id:a,parts:[l]})}return e}function h(t,n){var e=l(t.insertInto);if(!e)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=c[c.length-1];if("top"===t.insertAt)r?r.nextSibling?e.insertBefore(n,r.nextSibling):e.appendChild(n):e.insertBefore(n,e.firstChild),c.push(n);else if("bottom"===t.insertAt)e.appendChild(n);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=l(t.insertInto+" "+t.insertAt.before);e.insertBefore(n,o)}}function b(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var n=c.indexOf(t);n>=0&&c.splice(n,1)}function v(t){var n=document.createElement("style");return t.attrs.type="text/css",m(n,t.attrs),h(t,n),n}function m(t,n){Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])}))}function g(t,n){var e,r,o,i;if(n.transform&&t.css){if(!(i=n.transform(t.css)))return function(){};t.css=i}if(n.singleton){var a=u++;e=s||(s=v(n)),r=C.bind(null,e,a,!1),o=C.bind(null,e,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var n=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",m(n,t.attrs),h(t,n),n}(n),r=q.bind(null,e,n),o=function(){b(e),e.href&&URL.revokeObjectURL(e.href)}):(e=v(n),r=w.bind(null,e),o=function(){b(e)});return r(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;r(t=n)}else o()}}t.exports=function(t,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(n=n||{}).attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||"boolean"==typeof n.singleton||(n.singleton=a()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var e=d(t,n);return p(e,n),function(t){for(var r=[],o=0;o<e.length;o++){var a=e[o];(l=i[a.id]).refs--,r.push(l)}t&&p(d(t,n),n);for(o=0;o<r.length;o++){var l;if(0===(l=r[o]).refs){for(var s=0;s<l.parts.length;s++)l.parts[s]();delete i[l.id]}}}};var y,x=(y=[],function(t,n){return y[t]=n,y.filter(Boolean).join("\n")});function C(t,n,e,r){var o=e?"":r.css;if(t.styleSheet)t.styleSheet.cssText=x(n,o);else{var i=document.createTextNode(o),a=t.childNodes;a[n]&&t.removeChild(a[n]),a.length?t.insertBefore(i,a[n]):t.appendChild(i)}}function w(t,n){var e=n.css,r=n.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}function q(t,n,e){var r=e.css,o=e.sourceMap,i=void 0===n.convertToAbsoluteUrls&&o;(n.convertToAbsoluteUrls||i)&&(r=f(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),l=t.href;t.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}},function(t,n){t.exports=function(t){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var e=n.protocol+"//"+n.host,r=e+n.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,n){var o,i=n.trim().replace(/^"(.*)"$/,(function(t,n){return n})).replace(/^'(.*)'$/,(function(t,n){return n}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?e+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vc3JjL3F1aWxsLmh0bWxFZGl0QnV0dG9uLmpzIiwid2VicGFjazovLy8uL3NyYy9zdHlsZXMuY3NzPzAyYWUiLCJ3ZWJwYWNrOi8vLy4vc3JjL3N0eWxlcy5jc3MiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvbGliL2Nzcy1iYXNlLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9zdHlsZS1sb2FkZXIvbGliL2FkZFN0eWxlcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvc3R5bGUtbG9hZGVyL2xpYi91cmxzLmpzIl0sIm5hbWVzIjpbImluc3RhbGxlZE1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJleHBvcnRzIiwibW9kdWxlIiwiaSIsImwiLCJtb2R1bGVzIiwiY2FsbCIsIm0iLCJjIiwiZCIsIm5hbWUiLCJnZXR0ZXIiLCJvIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJlbnVtZXJhYmxlIiwiZ2V0IiwiciIsIlN5bWJvbCIsInRvU3RyaW5nVGFnIiwidmFsdWUiLCJ0IiwibW9kZSIsIl9fZXNNb2R1bGUiLCJucyIsImN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uaW5kZXhPZihcIi8vXCIpID09PSAwKSB7XG5cdFx0ICBcdC8vVE9ETzogc2hvdWxkIHdlIGFkZCBwcm90b2NvbD9cblx0XHRcdG5ld1VybCA9IHVucXVvdGVkT3JpZ1VybDtcblx0XHR9IGVsc2UgaWYgKHVucXVvdGVkT3JpZ1VybC5pbmRleE9mKFwiL1wiKSA9PT0gMCkge1xuXHRcdFx0Ly8gcGF0aCBzaG91bGQgYmUgcmVsYXRpdmUgdG8gdGhlIGJhc2UgdXJsXG5cdFx0XHRuZXdVcmwgPSBiYXNlVXJsICsgdW5xdW90ZWRPcmlnVXJsOyAvLyBhbHJlYWR5IHN0YXJ0cyB3aXRoICcvJ1xuXHRcdH0gZWxzZSB7XG5cdFx0XHQvLyBwYXRoIHNob3VsZCBiZSByZWxhdGl2ZSB0byBjdXJyZW50IGRpcmVjdG9yeVxuXHRcdFx0bmV3VXJsID0gY3VycmVudERpciArIHVucXVvdGVkT3JpZ1VybC5yZXBsYWNlKC9eXFwuXFwvLywgXCJcIik7IC8vIFN0cmlwIGxlYWRpbmcgJy4vJ1xuXHRcdH1cblxuXHRcdC8vIHNlbmQgYmFjayB0aGUgZml4ZWQgdXJsKC4uLilcblx0XHRyZXR1cm4gXCJ1cmwoXCIgKyBKU09OLnN0cmluZ2lmeShuZXdVcmwpICsgXCIpXCI7XG5cdH0pO1xuXG5cdC8vIHNlbmQgYmFjayB0aGUgZml4ZWQgY3NzXG5cdHJldHVybiBmaXhlZENzcztcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9 |
{ | ||
"name": "quill-html-edit-button", | ||
"description": "A Quill rich text editor Module which adds an html edit button to the quill editor", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"main": "src/quill.htmlEditButton.js", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/benwinding/quill-html-edit-button", |
@@ -0,4 +1,9 @@ | ||
import './styles.css'; | ||
function $create(elName) { | ||
return document.createElement(elName); | ||
} | ||
function $setAttr(el, key, value) { | ||
return el.setAttribute(key, value); | ||
} | ||
@@ -24,7 +29,9 @@ let debug = false; | ||
// Add button to all quill toolbar instances | ||
let toolbars = quill.container.parentElement.querySelectorAll(".ql-toolbar"); | ||
let toolbars = quill.container.parentElement.querySelectorAll( | ||
".ql-toolbar" | ||
); | ||
toolbars = [].slice.call(toolbars); | ||
toolbars.forEach(toolbarEl => { | ||
const buttonContainer = $create("span"); | ||
buttonContainer.setAttribute("class", "ql-formats"); | ||
$setAttr(buttonContainer, "class", "ql-formats"); | ||
const button = $create("button"); | ||
@@ -47,36 +54,23 @@ button.innerHTML = "<>"; | ||
const overlayContainer = $create("div"); | ||
overlayContainer.setAttribute( | ||
"style", | ||
"background: #0000007d; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;" | ||
); | ||
popupContainer.setAttribute( | ||
"style", | ||
"background: #ddd; position: absolute; top: 5%; left: 5%; right: 5%; bottom: 5%; border-radius: 10px;" | ||
); | ||
const title = $create("i"); | ||
title.setAttribute("style", "margin: 0; display: block;"); | ||
title.innerText = | ||
'Edit HTML here, when you click "OK" the quill editor\'s contents will be replaced'; | ||
$setAttr(overlayContainer, "class", "ql-html-overlayContainer"); | ||
$setAttr(popupContainer, "class", "ql-html-popupContainer"); | ||
const popupTitle = $create("i"); | ||
$setAttr(popupTitle, "class", "ql-html-popupTitle"); | ||
popupTitle.innerText = | ||
'Edit HTML here, when you click "OK" ' + | ||
"the quill editor's contents will be replaced"; | ||
const textContainer = $create("div"); | ||
textContainer.appendChild(title); | ||
textContainer.setAttribute( | ||
"style", | ||
"position: relative; width: calc(100% - 40px); height: calc(100% - 40px); padding: 20px;" | ||
); | ||
textContainer.appendChild(popupTitle); | ||
$setAttr(textContainer, "class", "ql-html-textContainer"); | ||
const textArea = $create("textarea"); | ||
textArea.setAttribute( | ||
"style", | ||
"position: absolute; left:15px; width: calc(100% - 45px); height: calc(100% - 116px);" | ||
); | ||
$setAttr(textArea, "class", "ql-html-textArea"); | ||
textArea.value = formatHTML(htmlFromEditor); | ||
const buttonCancel = $create("button"); | ||
buttonCancel.innerHTML = "Cancel"; | ||
buttonCancel.setAttribute("style", "margin-right: 20px;"); | ||
$setAttr(buttonCancel, "class", "ql-html-buttonCancel"); | ||
const buttonOk = $create("button"); | ||
buttonOk.innerHTML = "Ok"; | ||
const buttonGroup = $create("div"); | ||
buttonGroup.setAttribute( | ||
"style", | ||
"position: absolute; bottom: 20px; transform: scale(1.5); left: calc(50% - 60px)" | ||
); | ||
$setAttr(buttonGroup, "class", "ql-html-buttonGroup"); | ||
buttonGroup.appendChild(buttonCancel); | ||
@@ -83,0 +77,0 @@ buttonGroup.appendChild(buttonOk); |
@@ -13,6 +13,6 @@ const path = require("path"); | ||
path: path.resolve(__dirname, "dist"), | ||
publicPath: "/dist/", | ||
publicPath: "/dist/" | ||
}, | ||
devServer: { | ||
contentBase: './src', | ||
contentBase: "./src" | ||
}, | ||
@@ -22,3 +22,3 @@ externals: { | ||
}, | ||
devtool: 'inline-source-map', | ||
devtool: "inline-source-map", | ||
module: { | ||
@@ -28,12 +28,3 @@ rules: [ | ||
test: /\.css$/, | ||
use: ExtractTextPlugin.extract({ | ||
use: [ | ||
{ | ||
loader: "css-loader", | ||
options: { | ||
minimize: true | ||
} | ||
} | ||
] | ||
}) | ||
use: ["style-loader", "css-loader"] | ||
}, | ||
@@ -40,0 +31,0 @@ { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
166694
15
318