pom-text-editor 0.2.24 → 0.2.26
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 +1 -1
- package/dist/pom-text-editor.cjs.js +2 -2
- package/dist/pom-text-editor.es.js +461 -265
- package/dist/pom-text-editor.umd.js +2 -2
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.heading{content:"H"}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.inset-y-0{top:0;bottom:0}.right-2{right:.5rem}.z-10{z-index:10}.m-1{margin:.25rem}.m-3{margin:.75rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mr-1{margin-right:-.25rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-\\[3vh\\]{height:3vh}.w-\\[12vw\\]{width:12vw}.w-\\[6vw\\]{width:6vw}.w-full{width:100%}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.gap-1{gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-start{text-align:start}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.italic{font-style:italic}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.display-color{border:1px solid #ccc;text-align:center;font-size:18px;background-color:#f0f0f0;position:relative;display:inline-block;cursor:pointer}.color-container{width:25vw;display:none;position:absolute;z-index:9999;background-color:#fff;padding:1px;box-shadow:0 4px 6px #0000001a;border:1px solid #ccc;border-radius:5px;transition:opacity .3s ease,visibility .3s ease}.display-color:hover+.color-container,.display-color:active+.color-container{display:block}.color-container:hover{display:block;box-shadow:0 4px 8px #0000001a;padding:14px}.color-grid{display:flex;flex-wrap:wrap;gap:5px}.pom-editor-menu-fonts{display:none;position:absolute}.showfontFamilyMenu:hover+.pom-editor-menu-fonts,.pom-editor-menu-fonts:hover{display:inline-block}.pom-editor-menu:hover{display:block}.pom-editor-menu{display:none;background-color:#fff;border-radius:12px;box-shadow:0 4px 8px #0000001a;width:28vw;height:41vh;overflow:auto}.color-box{width:50px;height:50px;border-radius:8px;transition:transform .3s,box-shadow .3s;cursor:pointer}.color-box:hover{transform:scale(1.1);box-shadow:0 6px 12px #0003}#fullTextEditor .card{padding:2em}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}#fullTextEditor a:hover{color:#747bff}#fullTextEditor button{background-color:#f9f9f9}}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.group:hover .group-hover\\:block{display:block}.editor[data-v-367a2559]:empty:before{content:attr(data-placeholder);color:#aaa;left:10px;top:10px;pointer-events:none;font-size:19px}.editor[data-v-367a2559]:focus:before{content:none}.table-picker-wrapper[data-v-367a2559]{position:relative;display:inline-block}.table-picker-trigger[data-v-367a2559]{cursor:pointer;display:flex;align-items:center}.table-picker-container[data-v-367a2559]{position:absolute;top:10%;right:90;margin-top:10px;padding:10px;border:0;background-color:#f4f4f4;cursor:pointer;-webkit-user-select:none;user-select:none;width:max-content;display:none;left:85%!important;top:-7px}.table-picker-wrapper:hover .table-picker-container[data-v-367a2559]{display:block}.table-picker-grid[data-v-367a2559]{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px);gap:2px;margin-bottom:10px}.table-picker-grid div[data-v-367a2559]{width:20px;height:20px;border:1px solid #ddd;background-color:#efa153ce}.table-picker-grid div[data-v-367a2559]:hover{background-color:#f8f6f6;border:0}.table-dimensions[data-v-367a2559]{font-size:12px;color:#333}.pomXEditor[data-v-367a2559]{border:1px;border-style:solid;border-color:#6972734e}#editor[data-v-367a2559]:focus{outline:none;border:none}.pom-table-editor-container[data-v-367a2559]{display:flex}.pom-table-editor-container a[data-v-367a2559]{color:#00f;text-decoration:underline;cursor:pointer}.pom-table-editor-container a[data-v-367a2559]:link{color:#00f}.pom-table-editor-container a[data-v-367a2559]:visited{color:purple}.pom-table-editor-container a[data-v-367a2559]:hover{color:red;text-decoration:none}.pom-table-editor-container a[data-v-367a2559]:active{color:orange}@media print{.hideonprint[data-v-367a2559]{display:none!important}[data-v-367a2559]{overflow:hidden}}/*!\n * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */.pom-main-element-container .editor[data-v-705c999a]:empty:before{content:attr(data-placeholder);color:#aaa;left:10px;top:10px;pointer-events:none;font-size:19px}.pom-main-element-container .editor[data-v-705c999a]:focus:before{content:none}.pom-main-element-container .table-picker-wrapper[data-v-705c999a]{position:relative;display:inline-block}.pom-main-element-container .table-picker-trigger[data-v-705c999a]{cursor:pointer;display:flex;align-items:center}.pom-main-element-container .table-picker-container[data-v-705c999a]{position:absolute;top:10%;right:90;margin-top:10px;padding:10px;border:0;background-color:#f4f4f4;cursor:pointer;-webkit-user-select:none;user-select:none;width:max-content;display:none;left:85%!important;top:-7px}.pom-main-element-container .table-picker-wrapper:hover .table-picker-container[data-v-705c999a]{display:block}.pom-main-element-container .table-picker-grid[data-v-705c999a]{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px);gap:2px;margin-bottom:10px}.pom-main-element-container .table-picker-grid div[data-v-705c999a]{width:20px;height:20px;border:1px solid #ddd;background-color:#efa153ce}.pom-main-element-container .table-picker-grid div[data-v-705c999a]:hover{background-color:#f8f6f6;border:0}.table-dimensions[data-v-705c999a]{font-size:12px;color:#333}.pom-main-element-container .pomXEditor[data-v-705c999a]{border:1px;border-style:solid;border-color:#6972734e}.pom-main-element-container #editor[data-v-705c999a]:focus{outline:none;border:none}.pom-main-element-container .pom-table-editor-container[data-v-705c999a]{display:flex}.pom-main-element-container .pom-table-editor-container a[data-v-705c999a]{color:#00f;text-decoration:underline;cursor:pointer}.pom-main-element-container .pom-table-editor-container a[data-v-705c999a]:link{color:#00f}.pom-main-element-container .pom-table-editor-container a[data-v-705c999a]:visited{color:purple}.pom-main-element-container .pom-table-editor-container a[data-v-705c999a]:hover{color:red;text-decoration:none}.pom-main-element-container .pom-table-editor-container a[data-v-705c999a]:active{color:orange}@media print{.hideonprint[data-v-705c999a]{display:none!important}[data-v-705c999a]{overflow:hidden}}.pom-main-element-container .editor[data-v-705c999a]{padding:10px;border:1px solid #ccc;min-height:200px}.pom-main-element-container .resizable-image[data-v-705c999a]{max-width:100%;resize:both;overflow:auto;display:block;cursor:nwse-resize}.pom-main-element-container[data-v-705c999a] ::-webkit-scrollbar{width:12px;height:12px}.pom-main-element-container[data-v-705c999a] ::-webkit-scrollbar-track{background:#f1f1f1}.pom-main-element-container[data-v-705c999a] ::-webkit-scrollbar-thumb{background-color:#888;border-radius:6px;border:3px solid #f1f1f1}.pom-main-element-container[data-v-705c999a] ::-webkit-scrollbar-thumb:hover{background:#555}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
-
import { ref, onMounted, openBlock, createElementBlock, createElementVNode, unref, renderSlot, Fragment, renderList, normalizeStyle, toDisplayString, createCommentVNode,
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.heading{content:"H"}#pom-texedito-container div ::selection{background:#5986e7;color:#000}#pom-texedito-container p ::selection{background:#8ae74b;color:#000}#pom-texedito-container a ::selection{background:#5986e7;color:#000}#pom-texedito-container img ::selection{background:#5edba0;color:#000}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.inset-y-0{top:0;bottom:0}.right-2{right:.5rem}.z-10{z-index:10}.m-1{margin:.25rem}.m-3{margin:.75rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mr-1{margin-right:-.25rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-\\[3vh\\]{height:3vh}.w-\\[12vw\\]{width:12vw}.w-\\[6vw\\]{width:6vw}.w-full{width:100%}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.gap-1{gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-start{text-align:start}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.italic{font-style:italic}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.display-color{border:1px solid #ccc;text-align:center;font-size:18px;position:relative!important;display:inline-block;cursor:pointer}.display-color:hover+.color-container,.display-color:active+.color-container{display:block}.elemeSetDropDown{box-shadow:9px 5px 42px -14px #000000b8;-webkit-box-shadow:9px 5px 42px -14px rgba(0,0,0,.72);-moz-box-shadow:9px 5px 42px -14px rgba(0,0,0,.72);border-radius:10px;border:#33323222 .1px solid}.color-container{display:none;box-shadow:0 4px 8px #0000001a;padding:14px;position:absolute;left:0;z-index:100;background-color:#fff;width:19vw;height:30vh!important;overflow:auto;top:28px}.color-grid{display:flex;flex-wrap:wrap;gap:5px}.pom-editor-menu-fonts:hover{border:#c8c8c821 1px solid;background:#8d8c8c0a;color:#000;box-shadow:4px 14px 28px -15px #2c2c2cbb;-moz-box-shadow:4px 14px 28px -15px rgba(44,44,44,.734);-webkit-box-shadow:4px 14px 28px -15px rgba(44,44,44,.734)}.pom-editor-menu:hover{display:block!important}.pom-editor-menu{display:none!important;background-color:#fff;border-radius:12px;box-shadow:0 4px 8px #0000001a;width:28vw;height:41vh;overflow:auto}.color-box{width:30px;height:30px;border-radius:8px;transition:transform .3s,box-shadow .3s;cursor:pointer}.color-box:hover{transform:scale(1.1);box-shadow:0 6px 12px #0003}#fullTextEditor .card{padding:2em}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}#fullTextEditor a:hover{color:#747bff}#fullTextEditor button{background-color:#f9f9f9}}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.group:hover .group-hover\\:block{display:block}.editor:empty:before{content:attr(data-placeholder);color:#aaa;left:10px;top:10px;pointer-events:none;font-size:19px}.editor:focus:before{content:none}.table-picker-wrapper{position:relative;display:inline-block}.table-picker-trigger{cursor:pointer;display:flex;align-items:center}.table-picker-container{position:absolute;top:10%;right:90;margin-top:10px;padding:10px;border:0;background-color:#f4f4f4;cursor:pointer;-webkit-user-select:none;user-select:none;width:max-content;display:none;left:85%!important;top:-7px}.table-picker-wrapper:hover .table-picker-container{display:block}.table-picker-grid{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px);gap:2px;margin-bottom:10px}.table-picker-grid div{width:20px;height:20px;border:1px solid #ddd;background-color:#efa153ce}.table-picker-grid div:hover{background-color:#f8f6f6;border:0}.table-dimensions{font-size:12px;color:#333}.pomXEditor{border:1px;border-style:solid;border-color:#6972734e}#editor:focus{outline:none;border:none}.pom-table-editor-container{display:flex}.pom-table-editor-container a{color:#00f;text-decoration:underline;cursor:pointer}.pom-table-editor-container a:link{color:#00f}.pom-table-editor-container a:visited{color:purple}.pom-table-editor-container a:hover{color:red;text-decoration:none}.pom-table-editor-container a:active{color:orange}@media print{.hideonprint{display:none!important}}/*!\n * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */.Image_dropped_pom{background:#adacacb4;border-radius:3px;margin:3px;z-index:100;box-shadow:10px 39px 90px 30px #664a4a42;-webkit-box-shadow:10px 39px 90px 30px rgba(102,74,74,.26);-moz-box-shadow:10px 39px 90px 30px rgba(102,74,74,.26);box-sizing:border-box}.Image_dropped_pom *:hover{background:#a14b1a9f;color:#fff;border:none;border-bottom:2px solid white;box-shadow:0 6px 6px #00000042,0 10px 20px #00000030}.imageClosingBtn{margin:0;position:absolute;top:-3px;right:-3px;bottom:0;z-index:101;color:red;background:#cd5a5e47;width:14px;height:15px;border:1px solid #ccc2c2;text-align:center;text-size-adjust:auto}.pom-main-element-container .editor[data-v-a5098aef]:empty:before{content:attr(data-placeholder);color:#aaa;left:10px;top:10px;pointer-events:none;font-size:19px}.pom-main-element-container .editor[data-v-a5098aef]:focus:before{content:none}.pom-main-element-container .table-picker-wrapper[data-v-a5098aef]{position:relative;display:inline-block}.pom-main-element-container .table-picker-trigger[data-v-a5098aef]{cursor:pointer;display:flex;align-items:center}.pom-main-element-container .table-picker-container[data-v-a5098aef]{position:absolute;top:10%;right:90;margin-top:10px;padding:10px;border:0;background-color:#f4f4f4;cursor:pointer;-webkit-user-select:none;user-select:none;width:max-content;display:none;left:85%!important;top:-7px}.pom-main-element-container .table-picker-wrapper:hover .table-picker-container[data-v-a5098aef]{display:block}.pom-main-element-container .table-picker-grid[data-v-a5098aef]{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px);gap:2px;margin-bottom:10px}.pom-main-element-container .table-picker-grid div[data-v-a5098aef]{width:20px;height:20px;border:1px solid #ddd;background-color:#efa153ce}.pom-main-element-container .table-picker-grid div[data-v-a5098aef]:hover{background-color:#f8f6f6;border:0}.table-dimensions[data-v-a5098aef]{font-size:12px;color:#333}.pom-main-element-container .pomXEditor[data-v-a5098aef]{border:1px;border-style:solid;border-color:#6972734e}.pom-main-element-container #editor[data-v-a5098aef]:focus{outline:none;border:none}.pom-main-element-container .pom-table-editor-container[data-v-a5098aef]{display:flex}.pom-main-element-container .pom-table-editor-container a[data-v-a5098aef]{color:#00f;text-decoration:underline;cursor:pointer}.pom-main-element-container .pom-table-editor-container a[data-v-a5098aef]:link{color:#00f}.pom-main-element-container .pom-table-editor-container a[data-v-a5098aef]:visited{color:purple}.pom-main-element-container .pom-table-editor-container a[data-v-a5098aef]:hover{color:red;text-decoration:none}.pom-main-element-container .pom-table-editor-container a[data-v-a5098aef]:active{color:orange}@media print{.hideonprint[data-v-a5098aef]{display:none!important}[data-v-a5098aef]{overflow:hidden}}.pom-main-element-container .editor[data-v-a5098aef]{padding:10px;border:1px solid #ccc;min-height:200px}.pom-main-element-container .resizable-image[data-v-a5098aef]{max-width:100%;resize:both;overflow:auto;display:block;cursor:nwse-resize}.pom-main-element-container[data-v-a5098aef] ::-webkit-scrollbar{width:12px;height:12px}.pom-main-element-container[data-v-a5098aef] ::-webkit-scrollbar-track{background:#f1f1f1}.pom-main-element-container[data-v-a5098aef] ::-webkit-scrollbar-thumb{background-color:#888;border-radius:6px;border:3px solid #f1f1f1}.pom-main-element-container[data-v-a5098aef] ::-webkit-scrollbar-thumb:hover{background:#555}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|
|
2
|
+
import { ref, onMounted, openBlock, createElementBlock, createElementVNode, unref, renderSlot, Fragment, renderList, normalizeStyle, toDisplayString, createCommentVNode, nextTick, pushScopeId, popScopeId, createStaticVNode, createTextVNode } from "vue";
|
|
3
3
|
function updateCursorInfo() {
|
|
4
4
|
const selection = window.getSelection();
|
|
5
5
|
if (selection.rangeCount > 0) {
|
|
@@ -31,36 +31,17 @@ function initResize(e) {
|
|
|
31
31
|
const startY = e.clientY;
|
|
32
32
|
const startWidth = parseFloat(window.getComputedStyle(container).width);
|
|
33
33
|
const startHeight = parseFloat(window.getComputedStyle(container).height);
|
|
34
|
-
function
|
|
35
|
-
let lastFunc;
|
|
36
|
-
let lastRan;
|
|
37
|
-
return function(...args) {
|
|
38
|
-
const context = this;
|
|
39
|
-
if (!lastRan) {
|
|
40
|
-
func.apply(context, args);
|
|
41
|
-
lastRan = Date.now();
|
|
42
|
-
} else {
|
|
43
|
-
clearTimeout(lastFunc);
|
|
44
|
-
lastFunc = setTimeout(function() {
|
|
45
|
-
if (Date.now() - lastRan >= limit) {
|
|
46
|
-
func.apply(context, args);
|
|
47
|
-
lastRan = Date.now();
|
|
48
|
-
}
|
|
49
|
-
}, limit - (Date.now() - lastRan));
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const onMouseMove = throttle(function(e2) {
|
|
34
|
+
function onMouseMove(e2) {
|
|
54
35
|
const dx = e2.clientX - startX;
|
|
55
36
|
const dy = e2.clientY - startY;
|
|
56
|
-
container.style.width = `${
|
|
57
|
-
container.style.height = `${
|
|
37
|
+
container.style.width = `${startWidth + dx}px`;
|
|
38
|
+
container.style.height = `${startHeight + dy}px`;
|
|
39
|
+
container.style.minWidth = "50px";
|
|
40
|
+
container.style.minHeight = "50px";
|
|
58
41
|
const img = container.querySelector("img");
|
|
59
|
-
if (img)
|
|
42
|
+
if (img)
|
|
60
43
|
img.style.width = "100%";
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}, 16);
|
|
44
|
+
}
|
|
64
45
|
function onMouseUp() {
|
|
65
46
|
document.removeEventListener("mousemove", onMouseMove);
|
|
66
47
|
document.removeEventListener("mouseup", onMouseUp);
|
|
@@ -86,9 +67,9 @@ function removeAllTables(hide = false, tables = document.getElementsByClassName(
|
|
|
86
67
|
});
|
|
87
68
|
}
|
|
88
69
|
function scopeOutTheUserDataReutur(printableContent = document.getElementById("pom-texedito-container").innerHTML, elementsTohide = ".hideonprint") {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
70
|
+
const printWindow = window.open("", "", "height=900,width=800");
|
|
71
|
+
printWindow.document.write("<html><head><title>Print</title>");
|
|
72
|
+
printWindow.document.write(`<style>
|
|
92
73
|
${elementsTohide} {
|
|
93
74
|
display: none;
|
|
94
75
|
}
|
|
@@ -102,47 +83,26 @@ function scopeOutTheUserDataReutur(printableContent = document.getElementById("p
|
|
|
102
83
|
display: block !important;
|
|
103
84
|
}
|
|
104
85
|
</style>`);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
bringBackWildImages(removeinlineblock);
|
|
111
|
-
return printWindow2;
|
|
112
|
-
}
|
|
113
|
-
function bringBackWildImages(imageContainers = printWindow.document.querySelectorAll(".pom-4-imageContainer")) {
|
|
114
|
-
if (imageContainers) {
|
|
115
|
-
imageContainers.forEach(function(element) {
|
|
116
|
-
const img = element.querySelector("img");
|
|
117
|
-
const computedStyles = element.getAttribute("style");
|
|
118
|
-
if (computedStyles) {
|
|
119
|
-
img.style.cssText = computedStyles + "; position: initial";
|
|
120
|
-
} else {
|
|
121
|
-
img.style.position = "initial";
|
|
122
|
-
}
|
|
123
|
-
element.style.display = "block";
|
|
124
|
-
const leftPosition = parseInt(element.style.left, 10);
|
|
125
|
-
if (leftPosition > 793.7) {
|
|
126
|
-
element.style.left = "793.7px";
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
86
|
+
printWindow.document.write("</head><body>");
|
|
87
|
+
printWindow.document.write(printableContent);
|
|
88
|
+
printWindow.document.write("</body></html>");
|
|
89
|
+
printWindow.document.close();
|
|
90
|
+
return printWindow;
|
|
130
91
|
}
|
|
131
92
|
function exportUserHtmlForAtheUse(printableContent = document.getElementById("pom-texedito-container")) {
|
|
132
|
-
bringBackWildImages(printableContent.querySelectorAll(".pom-4-imageContainer"));
|
|
133
93
|
const returnData = printableContent.innerHTML;
|
|
134
94
|
return returnData;
|
|
135
95
|
}
|
|
136
|
-
function previewAndPrint(print = true, printableContent = document.getElementById("
|
|
96
|
+
function previewAndPrint(print = true, printableContent = document.getElementById("editor").innerHTML, elementsTohide = "hideonprint") {
|
|
137
97
|
const printableContent2 = styleCss() + printableContent;
|
|
138
|
-
const
|
|
98
|
+
const printWindow = scopeOutTheUserDataReutur(printableContent2, elementsTohide);
|
|
139
99
|
if (print) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
100
|
+
printWindow.focus();
|
|
101
|
+
printWindow.onload = function() {
|
|
102
|
+
printWindow.print();
|
|
143
103
|
};
|
|
144
|
-
|
|
145
|
-
|
|
104
|
+
printWindow.onafterprint = function() {
|
|
105
|
+
printWindow.close();
|
|
146
106
|
};
|
|
147
107
|
}
|
|
148
108
|
}
|
|
@@ -160,6 +120,84 @@ function OnmountedTableActionActivation() {
|
|
|
160
120
|
});
|
|
161
121
|
});
|
|
162
122
|
}
|
|
123
|
+
function initResizeImage(e, type, imgResizer, imgElement) {
|
|
124
|
+
e.preventDefault();
|
|
125
|
+
const currentResizer = type;
|
|
126
|
+
window.addEventListener("mousemove", resizeHandler);
|
|
127
|
+
window.addEventListener("mouseup", stopResize);
|
|
128
|
+
function resizeHandler(e2) {
|
|
129
|
+
resize(e2, currentResizer, imgResizer, imgElement);
|
|
130
|
+
}
|
|
131
|
+
function stopResize() {
|
|
132
|
+
window.removeEventListener("mousemove", resizeHandler);
|
|
133
|
+
window.removeEventListener("mouseup", stopResize);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function resize(e, currentResizer, imgResizer, imgElement) {
|
|
137
|
+
const rect = imgResizer.getBoundingClientRect();
|
|
138
|
+
if (currentResizer === "width" || currentResizer === "both") {
|
|
139
|
+
const newWidth = e.clientX - rect.left;
|
|
140
|
+
imgResizer.style.width = newWidth + "px";
|
|
141
|
+
imgElement.style.width = newWidth + "px";
|
|
142
|
+
}
|
|
143
|
+
if (currentResizer === "height" || currentResizer === "both") {
|
|
144
|
+
const newHeight = e.clientY - rect.top;
|
|
145
|
+
imgElement.style.height = newHeight + "px";
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function ImageResizing() {
|
|
149
|
+
const widthResizers = document.getElementsByClassName("widthResizer");
|
|
150
|
+
Array.from(widthResizers).forEach((item, i) => {
|
|
151
|
+
const imgResizer = document.getElementsByClassName("resizer-image-dropped")[i];
|
|
152
|
+
const imgElement = document.getElementsByClassName("resizable-image")[i];
|
|
153
|
+
const heightResizer = document.getElementsByClassName("heightResizer")[i];
|
|
154
|
+
const cornerResizer = document.getElementsByClassName("cornerResizer")[i];
|
|
155
|
+
if (item) {
|
|
156
|
+
item.addEventListener("mousedown", (e) => initResizeImage(e, "width", imgResizer, imgElement));
|
|
157
|
+
}
|
|
158
|
+
if (heightResizer) {
|
|
159
|
+
heightResizer.addEventListener("mousedown", (e) => initResizeImage(e, "height", imgResizer, imgElement));
|
|
160
|
+
}
|
|
161
|
+
if (cornerResizer) {
|
|
162
|
+
cornerResizer.addEventListener("mousedown", (e) => initResizeImage(e, "both", imgResizer, imgElement));
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function editorKeyActions(savedRange2, editorRef) {
|
|
167
|
+
const myDiv = document.getElementById("editor");
|
|
168
|
+
myDiv.addEventListener("keydown", function(event) {
|
|
169
|
+
const rng = savedRange2.value["range"];
|
|
170
|
+
if (event.code === "Tab") {
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
const spaceBefore = document.createElement("span");
|
|
173
|
+
spaceBefore.innerHTML = " ";
|
|
174
|
+
rng.insertNode(spaceBefore);
|
|
175
|
+
rng.setStartAfter(spaceBefore);
|
|
176
|
+
rng.collapse(true);
|
|
177
|
+
const sel = window.getSelection();
|
|
178
|
+
sel.removeAllRanges();
|
|
179
|
+
sel.addRange(rng);
|
|
180
|
+
} else if (event.ctrlKey && event.key === "z") {
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
editorRef.innerHTML = UndoRedo["Undo"]();
|
|
183
|
+
} else if (event.ctrlKey && event.key === "y") {
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
editorRef.innerHTML = UndoRedo["Redo"]();
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function offCclicks(event) {
|
|
190
|
+
const elements = document.querySelectorAll(".Image_dropped_pom");
|
|
191
|
+
elements.forEach((element) => {
|
|
192
|
+
if (element.contains(event.target)) {
|
|
193
|
+
console.log(element, "qweqwe");
|
|
194
|
+
element.style.display = "none";
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function handleClickOutside() {
|
|
199
|
+
document.addEventListener("click", offCclicks);
|
|
200
|
+
}
|
|
163
201
|
let savedRange;
|
|
164
202
|
function handleMouseClick(editor2, tableDimensions) {
|
|
165
203
|
const [columns, rows] = tableDimensions.textContent.split(" x ").map(Number);
|
|
@@ -497,13 +535,19 @@ function changeTextDirection(savedRange2, editor2, style, value, suffix = "", el
|
|
|
497
535
|
return;
|
|
498
536
|
}
|
|
499
537
|
element.appendChild(highlightedText);
|
|
500
|
-
if (parentNode.id
|
|
501
|
-
textToReplace = element.innerHTML.replace("
|
|
538
|
+
if (parentNode.id == "editor") {
|
|
539
|
+
textToReplace = element.innerHTML.replace("float", "note");
|
|
502
540
|
savedRange2.deleteContents();
|
|
503
541
|
} else {
|
|
504
|
-
textToReplace =
|
|
542
|
+
textToReplace = parentNode.innerHTML;
|
|
543
|
+
parentNode.remove();
|
|
505
544
|
savedRange2.deleteContents();
|
|
506
545
|
}
|
|
546
|
+
document.querySelectorAll(".pom-4-textDirection").forEach((element2) => {
|
|
547
|
+
if (`${element2.innerHTML}`.trim().length === 0) {
|
|
548
|
+
element2.remove();
|
|
549
|
+
}
|
|
550
|
+
});
|
|
507
551
|
const currentStyle = element.style[style] || "";
|
|
508
552
|
const regex = new RegExp(suffix, "ig");
|
|
509
553
|
const rp = value.replace(regex, "") + suffix;
|
|
@@ -515,7 +559,13 @@ function changeTextDirection(savedRange2, editor2, style, value, suffix = "", el
|
|
|
515
559
|
element.style["margin-left"] = "4px";
|
|
516
560
|
element.style["margin-right"] = "4px";
|
|
517
561
|
element.innerHTML = textToReplace;
|
|
562
|
+
const spaceBefore = document.createElement("span");
|
|
563
|
+
const spaceAfter = document.createElement("span");
|
|
564
|
+
spaceBefore.innerHTML = " ";
|
|
565
|
+
spaceAfter.innerHTML = " ";
|
|
566
|
+
savedRange2.insertNode(spaceBefore);
|
|
518
567
|
savedRange2.insertNode(element);
|
|
568
|
+
savedRange2.insertNode(spaceAfter);
|
|
519
569
|
const newRange = document.createRange();
|
|
520
570
|
newRange.collapse(true);
|
|
521
571
|
selection.removeAllRanges();
|
|
@@ -551,9 +601,11 @@ function insertUnorderedListAtCursor(savedRange2, numRows = 2, liststyle = "list
|
|
|
551
601
|
}
|
|
552
602
|
}
|
|
553
603
|
const UndoRedo = {
|
|
554
|
-
|
|
555
|
-
// Tracks the current state of the text/image by
|
|
556
|
-
|
|
604
|
+
currentIndex: 0,
|
|
605
|
+
// Tracks the current state of the text/image by index
|
|
606
|
+
StoredText: null,
|
|
607
|
+
// Tracks the current state of the text/image
|
|
608
|
+
storeRecovery: [],
|
|
557
609
|
// Holds the history of changes for undo
|
|
558
610
|
redoStack: [],
|
|
559
611
|
// Holds the history of undone changes for redo
|
|
@@ -566,28 +618,30 @@ const UndoRedo = {
|
|
|
566
618
|
console.error("SaveCurrentChanges expects a string value.");
|
|
567
619
|
return;
|
|
568
620
|
}
|
|
569
|
-
if (this.
|
|
621
|
+
if (this.storeRecovery.length && this.storeRecovery[this.currentIndex - 1] === MyCurrentText) {
|
|
570
622
|
console.log("No changes to save.");
|
|
571
623
|
return;
|
|
572
624
|
}
|
|
573
|
-
|
|
574
|
-
this.
|
|
575
|
-
this.
|
|
576
|
-
this.
|
|
625
|
+
this.storeRecovery = this.storeRecovery.slice(0, this.currentIndex);
|
|
626
|
+
this.storeRecovery.push(MyCurrentText);
|
|
627
|
+
this.currentIndex = this.storeRecovery.length;
|
|
628
|
+
if (this.storeRecovery.length > 5e4) {
|
|
629
|
+
this.storeRecovery = this.storeRecovery.slice(this.storeRecovery.length - 5e4);
|
|
630
|
+
this.currentIndex = this.storeRecovery.length;
|
|
631
|
+
}
|
|
577
632
|
},
|
|
578
633
|
/**
|
|
579
634
|
* Reverts the last saved change (undo).
|
|
580
635
|
* @returns {string|null} - The previous state of the text/image or null if no undo is possible.
|
|
581
636
|
*/
|
|
582
637
|
Undo: function() {
|
|
583
|
-
if (this.
|
|
638
|
+
if (this.currentIndex === 0) {
|
|
584
639
|
console.log("Nothing to undo");
|
|
585
640
|
return null;
|
|
586
641
|
}
|
|
587
|
-
|
|
588
|
-
this.
|
|
589
|
-
|
|
590
|
-
return lastChange.text;
|
|
642
|
+
this.redoStack.push(this.storeRecovery[this.currentIndex - 1]);
|
|
643
|
+
this.currentIndex--;
|
|
644
|
+
return this.storeRecovery[this.currentIndex] || null;
|
|
591
645
|
},
|
|
592
646
|
/**
|
|
593
647
|
* Re-applies the most recently undone change (redo).
|
|
@@ -599,9 +653,9 @@ const UndoRedo = {
|
|
|
599
653
|
return null;
|
|
600
654
|
}
|
|
601
655
|
const lastUndo = this.redoStack.pop();
|
|
602
|
-
this.
|
|
603
|
-
this.
|
|
604
|
-
return lastUndo
|
|
656
|
+
this.storeRecovery.push(lastUndo);
|
|
657
|
+
this.currentIndex++;
|
|
658
|
+
return lastUndo;
|
|
605
659
|
}
|
|
606
660
|
};
|
|
607
661
|
function opensTyleOnElement(savedRange2, editor2, style, value, suffix = "", elementType = "span") {
|
|
@@ -621,7 +675,6 @@ function opensTyleOnElement(savedRange2, editor2, style, value, suffix = "", ele
|
|
|
621
675
|
const styleLikeSoJustReplace = ["font-sze"];
|
|
622
676
|
if (parentNode && tagName === elementType) {
|
|
623
677
|
const existingStyle = parentNode.getAttribute("style") || null;
|
|
624
|
-
console.log(parentNode.style[style], existingStyle, "parentNodeparentNodeparentNode");
|
|
625
678
|
if (existingStyle) {
|
|
626
679
|
const rege = new RegExp(`${style}:\\s*${value};?`, "g");
|
|
627
680
|
const exists = rege.test(existingStyle);
|
|
@@ -633,8 +686,8 @@ function opensTyleOnElement(savedRange2, editor2, style, value, suffix = "", ele
|
|
|
633
686
|
if (exists)
|
|
634
687
|
parentNode.setAttribute("style", updatedStyles);
|
|
635
688
|
}
|
|
636
|
-
return;
|
|
637
689
|
}
|
|
690
|
+
return;
|
|
638
691
|
} else {
|
|
639
692
|
const element = document.createElement(elementType);
|
|
640
693
|
element.style[style] = value;
|
|
@@ -853,7 +906,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
853
906
|
}
|
|
854
907
|
return target;
|
|
855
908
|
};
|
|
856
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
909
|
+
const _withScopeId = (n) => (pushScopeId("data-v-a5098aef"), n = n(), popScopeId(), n);
|
|
857
910
|
const _hoisted_1 = { class: "pom-main-element-container" };
|
|
858
911
|
const _hoisted_2 = {
|
|
859
912
|
style: { "width": "100%" },
|
|
@@ -866,7 +919,19 @@ const _hoisted_3 = {
|
|
|
866
919
|
const _hoisted_4 = { class: "flex flex space-x-2 items-center" };
|
|
867
920
|
const _hoisted_5 = { class: "items-center border-1 b g-gray-200 rounded cursor-pointer" };
|
|
868
921
|
const _hoisted_6 = { class: "relative inline-block text-left group z-10 border-0" };
|
|
869
|
-
const _hoisted_7 = /* @__PURE__ */
|
|
922
|
+
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "w-full flex rounded-md" }, [
|
|
923
|
+
/* @__PURE__ */ createElementVNode("button", {
|
|
924
|
+
type: "button",
|
|
925
|
+
class: "inline-flex justify-start border-none w-full rounded-md border shadow-sm text-sm font -medium",
|
|
926
|
+
id: "menu-button",
|
|
927
|
+
"aria-expanded": "true",
|
|
928
|
+
"aria-haspopup": "true"
|
|
929
|
+
}, [
|
|
930
|
+
/* @__PURE__ */ createElementVNode("div", { class: "p y-1 w borde r-1 w-full text-start in flex flex-wrap" }, [
|
|
931
|
+
/* @__PURE__ */ createElementVNode("span", { class: "cursor-pointer z-10 ml-1 mx-1 rounded-full text-center text-sm font-bold text-gray-600" }, "View")
|
|
932
|
+
])
|
|
933
|
+
])
|
|
934
|
+
], -1));
|
|
870
935
|
const _hoisted_8 = { class: "hidden absolute group-hover:block mt-0 w-[12vw] text-sm rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" };
|
|
871
936
|
const _hoisted_9 = {
|
|
872
937
|
class: "",
|
|
@@ -889,7 +954,19 @@ const _hoisted_15 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createEle
|
|
|
889
954
|
], -1));
|
|
890
955
|
const _hoisted_16 = { class: "items-center border-1 b g-gray-200 rounded cursor-pointer" };
|
|
891
956
|
const _hoisted_17 = { class: "relative inline-block text-left group z-10 border-0 w-ful l" };
|
|
892
|
-
const _hoisted_18 = /* @__PURE__ */
|
|
957
|
+
const _hoisted_18 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "w-full flex rounded-md" }, [
|
|
958
|
+
/* @__PURE__ */ createElementVNode("button", {
|
|
959
|
+
type: "button",
|
|
960
|
+
class: "inline-flex justify-start border-none w-full rounded-md border shadow-sm text-sm font -medium",
|
|
961
|
+
id: "menu-button",
|
|
962
|
+
"aria-expanded": "true",
|
|
963
|
+
"aria-haspopup": "true"
|
|
964
|
+
}, [
|
|
965
|
+
/* @__PURE__ */ createElementVNode("div", { class: "p y-1 w borde r-1 w-full text-start in flex flex-wrap" }, [
|
|
966
|
+
/* @__PURE__ */ createElementVNode("span", { class: "cursor-pointer z-10 ml-1 mx-1 rounded-full text-center text-sm font-bold text-gray-600" }, "Format")
|
|
967
|
+
])
|
|
968
|
+
])
|
|
969
|
+
], -1));
|
|
893
970
|
const _hoisted_19 = { class: "hidden absolute group-hover:block mt-0 w-[12vw] text-sm rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" };
|
|
894
971
|
const _hoisted_20 = {
|
|
895
972
|
class: "",
|
|
@@ -987,7 +1064,19 @@ const _hoisted_65 = [
|
|
|
987
1064
|
];
|
|
988
1065
|
const _hoisted_66 = { class: "flex items-center border-1 b g-gray-200 rounded cursor-pointer" };
|
|
989
1066
|
const _hoisted_67 = { class: "relative inline-block text-left group z-10 border-0 w-ful l" };
|
|
990
|
-
const _hoisted_68 = /* @__PURE__ */
|
|
1067
|
+
const _hoisted_68 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "w-full flex rounded-md" }, [
|
|
1068
|
+
/* @__PURE__ */ createElementVNode("button", {
|
|
1069
|
+
type: "button",
|
|
1070
|
+
class: "inline-flex justify-start border-none w-full rounded-md border shadow-sm text-sm font -medium",
|
|
1071
|
+
id: "menu-button",
|
|
1072
|
+
"aria-expanded": "true",
|
|
1073
|
+
"aria-haspopup": "true"
|
|
1074
|
+
}, [
|
|
1075
|
+
/* @__PURE__ */ createElementVNode("div", { class: "p y-1 w borde r-1 w-full text-start in flex flex-wrap" }, [
|
|
1076
|
+
/* @__PURE__ */ createElementVNode("span", { class: "cursor-pointer z-10 ml-1 mx-1 rounded-full text-center text-sm font-bold text-gray-600" }, "Insert")
|
|
1077
|
+
])
|
|
1078
|
+
])
|
|
1079
|
+
], -1));
|
|
991
1080
|
const _hoisted_69 = { class: "hidden absolute group-hover:block mt-0 w-[12vw] text-sm rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" };
|
|
992
1081
|
const _hoisted_70 = {
|
|
993
1082
|
class: "",
|
|
@@ -1029,7 +1118,7 @@ const _hoisted_88 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createEle
|
|
|
1029
1118
|
/* @__PURE__ */ createElementVNode("i", { class: "table p x-2" }),
|
|
1030
1119
|
/* @__PURE__ */ createElementVNode("strong", { class: "px-3" }, "Create")
|
|
1031
1120
|
], -1));
|
|
1032
|
-
const _hoisted_89 = { class: "items-center border-1 b g-gray-200 rounded cursor-pointer" };
|
|
1121
|
+
const _hoisted_89 = { class: "flex items-center border-1 b g-gray-200 rounded cursor-pointer" };
|
|
1033
1122
|
const _hoisted_90 = { class: "relative inline-block text-left group z-10 border-0" };
|
|
1034
1123
|
const _hoisted_91 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "w-full flex rounded-md showfontFamilyMenu" }, [
|
|
1035
1124
|
/* @__PURE__ */ createElementVNode("button", {
|
|
@@ -1364,7 +1453,7 @@ const _hoisted_137 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createEl
|
|
|
1364
1453
|
const _hoisted_138 = { class: "hidden absolute group-hover:block mt-0 text-sm rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" };
|
|
1365
1454
|
const _hoisted_139 = {
|
|
1366
1455
|
class: "flex",
|
|
1367
|
-
|
|
1456
|
+
style: { "z-index": "4100 !important" }
|
|
1368
1457
|
};
|
|
1369
1458
|
const _hoisted_140 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, [
|
|
1370
1459
|
/* @__PURE__ */ createElementVNode("svg", {
|
|
@@ -1545,17 +1634,17 @@ const _hoisted_147 = [
|
|
|
1545
1634
|
];
|
|
1546
1635
|
const _hoisted_148 = {
|
|
1547
1636
|
class: "flex items-center gap-1 border-t-2 border-b-2 border-gray-300 bg-white w-full px-1",
|
|
1548
|
-
style: {
|
|
1637
|
+
style: {}
|
|
1549
1638
|
};
|
|
1550
|
-
const _hoisted_149 = /* @__PURE__ */ createStaticVNode('<i class="bold p x-2" data-v-
|
|
1639
|
+
const _hoisted_149 = /* @__PURE__ */ createStaticVNode('<i class="bold p x-2" data-v-a5098aef><svg viewBox="-2 0 20 20" width="13px" height="13px" xmlns="http://www.w3.org/2000/svg" fill="#000000" data-v-a5098aef><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-a5098aef></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></g><g id="SVGRepo_iconCarrier" data-v-a5098aef><g id="text-bold" transform="translate(-4 -2)" data-v-a5098aef><path id="primary" d="M5,3h7.5A4.49,4.49,0,0,1,17,7.5h0A4.49,4.49,0,0,1,12.5,12H7" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" data-v-a5098aef></path><path id="primary-2" data-name="primary" d="M5,21h9.5A4.49,4.49,0,0,0,19,16.5h0A4.49,4.49,0,0,0,14.5,12H7" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" data-v-a5098aef></path><path id="primary-3" data-name="primary" d="M7,3V21H8V3Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" data-v-a5098aef></path></g></g></svg></i>', 1);
|
|
1551
1640
|
const _hoisted_150 = [
|
|
1552
1641
|
_hoisted_149
|
|
1553
1642
|
];
|
|
1554
|
-
const _hoisted_151 = /* @__PURE__ */ createStaticVNode('<i class="italic p x-2" data-v-
|
|
1643
|
+
const _hoisted_151 = /* @__PURE__ */ createStaticVNode('<i class="italic p x-2" data-v-a5098aef><svg viewBox="0 0 20 20" width="15px" height="16px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#000000" data-v-a5098aef><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-a5098aef></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></g><g id="SVGRepo_iconCarrier" data-v-a5098aef><g id="layer1" data-v-a5098aef><path d="M 7 4 L 7 5 L 9.9921875 5 L 8 15.955078 L 8 16 L 5 16 L 5 17 L 12 17 L 12 16 L 9.0078125 16 L 11 5.0449219 L 11 5 L 14 5 L 14 4 L 7 4 z " style="fill:#222222;fill-opacity:1;stroke:none;stroke-width:0px;" data-v-a5098aef></path></g></g></svg></i>', 1);
|
|
1555
1644
|
const _hoisted_152 = [
|
|
1556
1645
|
_hoisted_151
|
|
1557
1646
|
];
|
|
1558
|
-
const _hoisted_153 = /* @__PURE__ */ createStaticVNode('<i class="underline p x-2" data-v-
|
|
1647
|
+
const _hoisted_153 = /* @__PURE__ */ createStaticVNode('<i class="underline p x-2" data-v-a5098aef><svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="13px" height="13px" viewBox="0 0 970.5 970.5" xml:space="preserve" data-v-a5098aef><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-a5098aef></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></g><g id="SVGRepo_iconCarrier" data-v-a5098aef><g data-v-a5098aef><path d="M116.1,868.5c-28.2,0-51,22.8-51,51s22.8,51,51,51h741.5c28.199,0,51-22.8,51-51s-22.801-51-51-51H116.1z" data-v-a5098aef></path><path d="M940.9,45.1c0-4.9,0-10.1,0-15.1c0-16.6-13.4-30-30-30H582.199c-16.6,0-30,13.4-30,30v14.5c0,15.5,11.801,28.4,27.201,29.9 c14.5,1.4,29,3.5,43.299,6.3c30.201,5.9,44.9,22.7,44.9,53.3v374.9c0,22-2.5,45.399-7.301,69.5c-4.6,23.1-13.898,45-27.6,65 c-14.299,20.1-34.199,36.899-59,49.899c-21.6,11.3-51.4,17.7-88.299,19.2c-37-1.4-66.7-7.9-88.3-19.2 c-24.801-13-44.7-29.7-59-49.899c-13.7-20-23-41.9-27.601-65c-4.8-24.2-7.3-47.601-7.3-69.5v-375c0-30.5,14.7-47.3,44.9-53.3 c14.3-2.8,28.699-4.9,43.3-6.3c15.399-1.5,27.2-14.4,27.2-29.9V30c0-16.6-13.4-30-30-30h-329c-16.6,0-30,13.4-30,30 c0,5,0,10.2,0,15.1c0,14.7,10.7,27.3,25.2,29.6C73,77.6,94.9,81.8,98.3,83c27,9.8,44.2,27.4,44.2,57v408.6c0,34.4,7.4,67.9,22,99.5 c14.6,31.601,36.5,60,65.2,84.4l0.1,0.1c28.8,24.2,64.8,43.601,106.9,57.7c41.8,14,90,21.101,143.2,21.101c1.7,0,3.5,0,5.399-0.101 c2,0,3.701,0.101,5.4,0.101C543.9,811.4,592,804.3,633.9,790.3c42.1-14.1,78-33.5,106.898-57.7l0.102-0.1 c28.699-24.4,50.6-52.8,65.199-84.4c14.6-31.6,22-65.1,22-99.5V140.1c0-29.6,17.301-47.2,44.199-57c3.4-1.2,25.301-5.4,43.5-8.3 C930.299,72.4,940.9,59.8,940.9,45.1z" data-v-a5098aef></path></g></g></svg></i>', 1);
|
|
1559
1648
|
const _hoisted_154 = [
|
|
1560
1649
|
_hoisted_153
|
|
1561
1650
|
];
|
|
@@ -1690,119 +1779,147 @@ const _hoisted_163 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createEl
|
|
|
1690
1779
|
const _hoisted_164 = [
|
|
1691
1780
|
_hoisted_163
|
|
1692
1781
|
];
|
|
1693
|
-
const _hoisted_165 = /* @__PURE__ */ createStaticVNode('<i class="-code p x-2" data-v-
|
|
1782
|
+
const _hoisted_165 = /* @__PURE__ */ createStaticVNode('<i class="-code p x-2" data-v-a5098aef><svg viewBox="0 0 16 16" width="13px" height="13px" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-a5098aef><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-a5098aef></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></g><g id="SVGRepo_iconCarrier" data-v-a5098aef><path d="M8.01005 0.858582L6.01005 14.8586L7.98995 15.1414L9.98995 1.14142L8.01005 0.858582Z" fill="#000000" data-v-a5098aef></path><path d="M12.5 11.5L11.0858 10.0858L13.1716 8L11.0858 5.91422L12.5 4.5L16 8L12.5 11.5Z" fill="#000000" data-v-a5098aef></path><path d="M2.82843 8L4.91421 10.0858L3.5 11.5L0 8L3.5 4.5L4.91421 5.91422L2.82843 8Z" fill="#000000" data-v-a5098aef></path></g></svg></i>', 1);
|
|
1694
1783
|
const _hoisted_166 = [
|
|
1695
1784
|
_hoisted_165
|
|
1696
1785
|
];
|
|
1697
|
-
const _hoisted_167 = { class: "
|
|
1698
|
-
const _hoisted_168 =
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
width: "24",
|
|
1704
|
-
height: "24",
|
|
1705
|
-
focusable: "false"
|
|
1786
|
+
const _hoisted_167 = { class: "items-center bg-gray-50 rounded cursor-pointer" };
|
|
1787
|
+
const _hoisted_168 = { class: "relative inline-block text-left group border-0" };
|
|
1788
|
+
const _hoisted_169 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "w-full flex rounded-md" }, [
|
|
1789
|
+
/* @__PURE__ */ createElementVNode("i", {
|
|
1790
|
+
class: "solid brush display-color elemeSetDropDown",
|
|
1791
|
+
style: { "margin": "6px 0px 0px 0px", "border": "none" }
|
|
1706
1792
|
}, [
|
|
1707
|
-
/* @__PURE__ */ createElementVNode("
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1793
|
+
/* @__PURE__ */ createElementVNode("svg", {
|
|
1794
|
+
width: "24",
|
|
1795
|
+
height: "24",
|
|
1796
|
+
focusable: "false"
|
|
1797
|
+
}, [
|
|
1798
|
+
/* @__PURE__ */ createElementVNode("g", { "fill-rule": "evenodd" }, [
|
|
1799
|
+
/* @__PURE__ */ createElementVNode("path", {
|
|
1800
|
+
class: "icon-highlight-bg-color__color",
|
|
1801
|
+
d: "M3 18h18v3H3z",
|
|
1802
|
+
fill: "#F1C40F"
|
|
1803
|
+
}),
|
|
1804
|
+
/* @__PURE__ */ createElementVNode("path", {
|
|
1805
|
+
"fill-rule": "nonzero",
|
|
1806
|
+
d: "M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"
|
|
1807
|
+
})
|
|
1808
|
+
])
|
|
1717
1809
|
])
|
|
1718
1810
|
])
|
|
1719
1811
|
], -1));
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1722
|
-
|
|
1812
|
+
const _hoisted_170 = { class: "hidden absolute group-hover:block mt-0 text-sm rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" };
|
|
1813
|
+
const _hoisted_171 = {
|
|
1814
|
+
class: "elemeSetDropDown",
|
|
1815
|
+
role: "none"
|
|
1723
1816
|
};
|
|
1724
|
-
const
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
class: "
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
/* @__PURE__ */ createElementVNode("span", { class: "icon tbtn__icon-wrap" }, [
|
|
1738
|
-
/* @__PURE__ */ createElementVNode("svg", {
|
|
1739
|
-
width: "24",
|
|
1740
|
-
height: "24",
|
|
1741
|
-
focusable: "false"
|
|
1817
|
+
const _hoisted_172 = {
|
|
1818
|
+
class: "color-grid p-1 m-1",
|
|
1819
|
+
style: { "width": "20vh", "height": "20vh", "overflow": "auto" }
|
|
1820
|
+
};
|
|
1821
|
+
const _hoisted_173 = ["onClick"];
|
|
1822
|
+
const _hoisted_174 = { class: "items-center bg-gray-50 rounded cursor-pointer" };
|
|
1823
|
+
const _hoisted_175 = { class: "relative inline-block text-left group border-0" };
|
|
1824
|
+
const _hoisted_176 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "w-full flex rounded-md" }, [
|
|
1825
|
+
/* @__PURE__ */ createElementVNode("span", null, [
|
|
1826
|
+
/* @__PURE__ */ createElementVNode("div", { class: "p y-1 w w-full text-start in" }, [
|
|
1827
|
+
/* @__PURE__ */ createElementVNode("i", {
|
|
1828
|
+
class: "solid brush display-color",
|
|
1829
|
+
style: { "margin": "6px 0px 0px 0px", "border": "none" }
|
|
1742
1830
|
}, [
|
|
1743
|
-
/* @__PURE__ */ createElementVNode("
|
|
1744
|
-
/* @__PURE__ */ createElementVNode("
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1831
|
+
/* @__PURE__ */ createElementVNode("span", { class: "icon tbtn__icon-wrap" }, [
|
|
1832
|
+
/* @__PURE__ */ createElementVNode("svg", {
|
|
1833
|
+
width: "24",
|
|
1834
|
+
height: "20",
|
|
1835
|
+
focusable: "false"
|
|
1836
|
+
}, [
|
|
1837
|
+
/* @__PURE__ */ createElementVNode("g", { "fill-rule": "evenodd" }, [
|
|
1838
|
+
/* @__PURE__ */ createElementVNode("path", {
|
|
1839
|
+
class: "icon-text-color__color",
|
|
1840
|
+
d: "M3 18h18v3H3z",
|
|
1841
|
+
fill: "#F1C40F"
|
|
1842
|
+
}),
|
|
1843
|
+
/* @__PURE__ */ createElementVNode("path", { d: "M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4Zm2.6-7.6-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4Z" })
|
|
1844
|
+
])
|
|
1845
|
+
])
|
|
1750
1846
|
])
|
|
1751
1847
|
])
|
|
1752
1848
|
])
|
|
1753
1849
|
])
|
|
1754
1850
|
], -1));
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
|
|
1851
|
+
const _hoisted_177 = { class: "hidden absolute group-hover:block mt-0 text-sm rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" };
|
|
1852
|
+
const _hoisted_178 = {
|
|
1853
|
+
class: "elemeSetDropDown",
|
|
1854
|
+
role: "none"
|
|
1758
1855
|
};
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
const _hoisted_179 = /* @__PURE__ */ createStaticVNode('<span class="" data-v-705c999a><svg viewBox="0 0 24 24" fill="none" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg" data-v-705c999a><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-705c999a></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-705c999a></g><g id="SVGRepo_iconCarrier" data-v-705c999a><path d="M20 7H9.00001C6.23858 7 4 9.23857 4 12C4 14.7614 6.23858 17 9 17H16M20 7L17 4M20 7L17 10" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-705c999a></path></g></svg></span>', 1);
|
|
1766
|
-
const _hoisted_180 = [
|
|
1767
|
-
_hoisted_179
|
|
1768
|
-
];
|
|
1769
|
-
const _hoisted_181 = /* @__PURE__ */ createStaticVNode('<span class="" data-v-705c999a><svg width="20px" height="20px" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="#000000" data-v-705c999a><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-705c999a></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-705c999a></g><g id="SVGRepo_iconCarrier" data-v-705c999a><path fill="#494c4e" d="M16 4H2c-.6 0-1-.4-1-1s.4-1 1-1h14c.6 0 1 .4 1 1s-.4 1-1 1zm0 4H2c-.6 0-1-.4-1-1s.4-1 1-1h14c.6 0 1 .4 1 1s-.4 1-1 1zm1 4v2c0 1-1 2-2 2h-2c0 .3 0 .5-.3.7-.2.2-.4.3-.7.3s-.5 0-.7-.3l-1-1c-.4-.4-.4-1 0-1.4l1-1c.4-.4 1-.4 1.4 0 .2.2.3.4.3.7h2v-2H2c-.6 0-1-.5-1-1s.5-1 1-1h13c1 0 2 1 2 2z" data-v-705c999a></path></g></svg></span>', 1);
|
|
1856
|
+
const _hoisted_179 = {
|
|
1857
|
+
class: "color-grid p-1 m-1",
|
|
1858
|
+
style: { "width": "20vh", "height": "20vh", "overflow": "auto" }
|
|
1859
|
+
};
|
|
1860
|
+
const _hoisted_180 = ["onClick"];
|
|
1861
|
+
const _hoisted_181 = /* @__PURE__ */ createStaticVNode('<span class="" data-v-a5098aef><svg viewBox="0 0 24 24" fill="none" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg" data-v-a5098aef><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-a5098aef></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></g><g id="SVGRepo_iconCarrier" data-v-a5098aef><path fill-rule="evenodd" clip-rule="evenodd" d="M7.53033 3.46967C7.82322 3.76256 7.82322 4.23744 7.53033 4.53033L5.81066 6.25H15C18.1756 6.25 20.75 8.82436 20.75 12C20.75 15.1756 18.1756 17.75 15 17.75H8.00001C7.58579 17.75 7.25001 17.4142 7.25001 17C7.25001 16.5858 7.58579 16.25 8.00001 16.25H15C17.3472 16.25 19.25 14.3472 19.25 12C19.25 9.65279 17.3472 7.75 15 7.75H5.81066L7.53033 9.46967C7.82322 9.76256 7.82322 10.2374 7.53033 10.5303C7.23744 10.8232 6.76256 10.8232 6.46967 10.5303L3.46967 7.53033C3.17678 7.23744 3.17678 6.76256 3.46967 6.46967L6.46967 3.46967C6.76256 3.17678 7.23744 3.17678 7.53033 3.46967Z" fill="#1C274C" data-v-a5098aef></path></g></svg></span>', 1);
|
|
1770
1862
|
const _hoisted_182 = [
|
|
1771
1863
|
_hoisted_181
|
|
1772
1864
|
];
|
|
1773
|
-
const _hoisted_183 =
|
|
1774
|
-
const _hoisted_184 =
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
const
|
|
1778
|
-
|
|
1779
|
-
|
|
1865
|
+
const _hoisted_183 = /* @__PURE__ */ createStaticVNode('<span class="" data-v-a5098aef><svg viewBox="0 0 24 24" fill="none" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg" data-v-a5098aef><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-a5098aef></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></g><g id="SVGRepo_iconCarrier" data-v-a5098aef><path d="M20 7H9.00001C6.23858 7 4 9.23857 4 12C4 14.7614 6.23858 17 9 17H16M20 7L17 4M20 7L17 10" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></path></g></svg></span>', 1);
|
|
1866
|
+
const _hoisted_184 = [
|
|
1867
|
+
_hoisted_183
|
|
1868
|
+
];
|
|
1869
|
+
const _hoisted_185 = /* @__PURE__ */ createStaticVNode('<span class="" data-v-a5098aef><svg width="20px" height="20px" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="#000000" data-v-a5098aef><g id="SVGRepo_bgCarrier" stroke-width="0" data-v-a5098aef></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" data-v-a5098aef></g><g id="SVGRepo_iconCarrier" data-v-a5098aef><path fill="#494c4e" d="M16 4H2c-.6 0-1-.4-1-1s.4-1 1-1h14c.6 0 1 .4 1 1s-.4 1-1 1zm0 4H2c-.6 0-1-.4-1-1s.4-1 1-1h14c.6 0 1 .4 1 1s-.4 1-1 1zm1 4v2c0 1-1 2-2 2h-2c0 .3 0 .5-.3.7-.2.2-.4.3-.7.3s-.5 0-.7-.3l-1-1c-.4-.4-.4-1 0-1.4l1-1c.4-.4 1-.4 1.4 0 .2.2.3.4.3.7h2v-2H2c-.6 0-1-.5-1-1s.5-1 1-1h13c1 0 2 1 2 2z" data-v-a5098aef></path></g></svg></span>', 1);
|
|
1870
|
+
const _hoisted_186 = [
|
|
1871
|
+
_hoisted_185
|
|
1872
|
+
];
|
|
1873
|
+
const _hoisted_187 = { class: "items-center bg-gray-50 rounded cursor-pointer" };
|
|
1874
|
+
const _hoisted_188 = {
|
|
1875
|
+
class: "relative inline-block text-left group border-0",
|
|
1876
|
+
style: { "z-index": "3 !important" }
|
|
1780
1877
|
};
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1878
|
+
const _hoisted_189 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "w-full flex rounded-md" }, [
|
|
1879
|
+
/* @__PURE__ */ createElementVNode("span", null, [
|
|
1880
|
+
/* @__PURE__ */ createElementVNode("div", { class: "p y-1 w w-full text-start in" }, [
|
|
1881
|
+
/* @__PURE__ */ createElementVNode("i", {
|
|
1882
|
+
class: "solid brush display-color",
|
|
1883
|
+
style: { "border": "none" }
|
|
1884
|
+
}, "Sizes ")
|
|
1885
|
+
])
|
|
1886
|
+
])
|
|
1887
|
+
], -1));
|
|
1888
|
+
const _hoisted_190 = {
|
|
1889
|
+
style: { "width": "4vw", "padding": "6px", "height": "24vh", "overflow": "auto" },
|
|
1890
|
+
class: "hidden elemeSetDropDown absolute group-hover:block mt-0 text-sm rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
|
|
1891
|
+
};
|
|
1892
|
+
const _hoisted_191 = ["onClick"];
|
|
1893
|
+
const _hoisted_192 = ["innerHTML"];
|
|
1894
|
+
const _hoisted_193 = {
|
|
1785
1895
|
key: 0,
|
|
1786
1896
|
class: "hideonprint flex items-center",
|
|
1787
1897
|
style: { "text-align": "center", "align-items": "stretch", "gap": "10px" }
|
|
1788
1898
|
};
|
|
1789
|
-
const
|
|
1790
|
-
const
|
|
1791
|
-
const
|
|
1792
|
-
|
|
1793
|
-
|
|
1899
|
+
const _hoisted_194 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("i", { class: "-" }, null, -1));
|
|
1900
|
+
const _hoisted_195 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("strong", { class: "p x-2" }, "NEW LINE", -1));
|
|
1901
|
+
const _hoisted_196 = [
|
|
1902
|
+
_hoisted_194,
|
|
1903
|
+
_hoisted_195
|
|
1794
1904
|
];
|
|
1795
|
-
const
|
|
1905
|
+
const _hoisted_197 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("p", { style: { "margin": "0 0 0 10px" } }, [
|
|
1796
1906
|
/* @__PURE__ */ createTextVNode("Cursor position: "),
|
|
1797
1907
|
/* @__PURE__ */ createElementVNode("span", { id: "cursorPosition" }, "0")
|
|
1798
1908
|
], -1));
|
|
1799
|
-
const
|
|
1909
|
+
const _hoisted_198 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("p", null, [
|
|
1800
1910
|
/* @__PURE__ */ createTextVNode("Text at cursor: "),
|
|
1801
1911
|
/* @__PURE__ */ createElementVNode("span", { id: "textAtCursor" })
|
|
1802
1912
|
], -1));
|
|
1803
1913
|
const _sfc_main = {
|
|
1804
1914
|
__name: "Editor",
|
|
1805
1915
|
props: {
|
|
1916
|
+
plugins: {
|
|
1917
|
+
default: {}
|
|
1918
|
+
// type:Object
|
|
1919
|
+
},
|
|
1920
|
+
maxHeight: {
|
|
1921
|
+
default: "100vh"
|
|
1922
|
+
},
|
|
1806
1923
|
Dvalue: {
|
|
1807
1924
|
default: ""
|
|
1808
1925
|
},
|
|
@@ -1819,13 +1936,13 @@ const _sfc_main = {
|
|
|
1819
1936
|
},
|
|
1820
1937
|
emits: ["change", "update"],
|
|
1821
1938
|
setup(__props, { emit: __emit }) {
|
|
1939
|
+
const props = __props;
|
|
1822
1940
|
const editorRef = ref(null);
|
|
1823
1941
|
const imageClicked = ref(false);
|
|
1824
1942
|
const savedRange2 = ref(null);
|
|
1825
1943
|
const tablePickerContainer = ref(null);
|
|
1826
1944
|
const tablePickerGrid = ref(null);
|
|
1827
1945
|
const tableDimensions = ref(null);
|
|
1828
|
-
ref([]);
|
|
1829
1946
|
let selectedImage = null;
|
|
1830
1947
|
const colors = ref([
|
|
1831
1948
|
"FF5733",
|
|
@@ -1888,7 +2005,6 @@ const _sfc_main = {
|
|
|
1888
2005
|
"000000"
|
|
1889
2006
|
]);
|
|
1890
2007
|
const emit = __emit;
|
|
1891
|
-
const props = __props;
|
|
1892
2008
|
const pomTextEditorContainer = ref(null);
|
|
1893
2009
|
function previewAndPrintFun(...args) {
|
|
1894
2010
|
try {
|
|
@@ -1961,34 +2077,50 @@ const _sfc_main = {
|
|
|
1961
2077
|
});
|
|
1962
2078
|
} else {
|
|
1963
2079
|
htmlResult = exportUserHtmlForAtheUse(editorRef.value);
|
|
1964
|
-
UndoRedo.SaveCurrentChanges(htmlResult);
|
|
1965
2080
|
if (props.cssWanted == true) {
|
|
1966
2081
|
emit("cssWanted", cssWanted2);
|
|
1967
2082
|
}
|
|
1968
2083
|
}
|
|
1969
2084
|
if (htmlResult) {
|
|
1970
2085
|
setTimeout(() => {
|
|
1971
|
-
|
|
2086
|
+
htmlResult = htmlResult.replace(/<(\w+)[^>]*>\s*<\/\1>/g, "");
|
|
2087
|
+
setTimeout(() => {
|
|
2088
|
+
UndoRedo.SaveCurrentChanges(htmlResult);
|
|
2089
|
+
}, 3e3);
|
|
2090
|
+
emit("change", htmlResult);
|
|
1972
2091
|
}, 300);
|
|
1973
2092
|
}
|
|
1974
2093
|
}
|
|
1975
|
-
function onMountedFunctionsset(params) {
|
|
2094
|
+
async function onMountedFunctionsset(params) {
|
|
1976
2095
|
editorRef.value.focus();
|
|
1977
|
-
|
|
1978
|
-
|
|
2096
|
+
nextTick(() => {
|
|
2097
|
+
returnData();
|
|
2098
|
+
OnmountedTableActionActivation();
|
|
2099
|
+
ImageResizing();
|
|
2100
|
+
imageContainerClicked();
|
|
2101
|
+
editorKeyActions(savedRange2, editorRef.value);
|
|
2102
|
+
});
|
|
1979
2103
|
}
|
|
1980
2104
|
function dropedImageRedirection(imgResizer) {
|
|
1981
2105
|
imgResizer.addEventListener("click", function(e) {
|
|
1982
2106
|
imageClicked.value = e;
|
|
1983
2107
|
const imageAction = document.createElement("div");
|
|
1984
2108
|
imageAction.style.display = "flex";
|
|
2109
|
+
imageAction.style.justifyContent = "flex-end";
|
|
2110
|
+
imageAction.style.flexWrap = "wrap";
|
|
2111
|
+
imageAction.style.flexDirection = "column-reverse";
|
|
1985
2112
|
imageAction.style.position = "absolute";
|
|
1986
|
-
imageAction.style.
|
|
1987
|
-
imageAction.style.right = "
|
|
2113
|
+
imageAction.style.top = "0px";
|
|
2114
|
+
imageAction.style.right = "19px";
|
|
1988
2115
|
imageAction.style.zIndex = "100";
|
|
1989
2116
|
imageAction.style.background = "white";
|
|
1990
2117
|
imageAction.classList.add("Image_dropped_pom");
|
|
1991
2118
|
imageAction.classList.add("hideOnprint");
|
|
2119
|
+
const closeTile = document.createElement("button");
|
|
2120
|
+
closeTile.style.position = "absolute";
|
|
2121
|
+
closeTile.textContent = " X";
|
|
2122
|
+
closeTile.style.margin = "5px";
|
|
2123
|
+
closeTile.classList.add("imageClosingBtn");
|
|
1992
2124
|
const floatLeftButton = document.createElement("button");
|
|
1993
2125
|
floatLeftButton.textContent = " Left";
|
|
1994
2126
|
floatLeftButton.style.margin = "5px";
|
|
@@ -1998,10 +2130,74 @@ const _sfc_main = {
|
|
|
1998
2130
|
const centerButton = document.createElement("button");
|
|
1999
2131
|
centerButton.textContent = "Center ";
|
|
2000
2132
|
centerButton.style.margin = "5px";
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2133
|
+
const WrapButton = document.createElement("button");
|
|
2134
|
+
WrapButton.textContent = "Wrap";
|
|
2135
|
+
WrapButton.style.margin = "5px";
|
|
2136
|
+
const DeleteButton = document.createElement("button");
|
|
2137
|
+
DeleteButton.textContent = "Erase";
|
|
2138
|
+
DeleteButton.style.margin = "5px";
|
|
2139
|
+
const stickImage = document.createElement("button");
|
|
2140
|
+
stickImage.textContent = "Glue";
|
|
2141
|
+
stickImage.style.margin = "5px";
|
|
2142
|
+
const Unglue = document.createElement("button");
|
|
2143
|
+
Unglue.textContent = "UnGlue";
|
|
2144
|
+
Unglue.style.margin = "5px";
|
|
2145
|
+
imageAction.appendChild(DeleteButton);
|
|
2146
|
+
imageAction.appendChild(WrapButton);
|
|
2147
|
+
if (!imgResizer.classList.contains("stickImage")) {
|
|
2148
|
+
imageAction.appendChild(centerButton);
|
|
2149
|
+
imageAction.appendChild(floatRightButton);
|
|
2150
|
+
imageAction.appendChild(stickImage);
|
|
2151
|
+
} else {
|
|
2152
|
+
imageAction.appendChild(Unglue);
|
|
2153
|
+
}
|
|
2154
|
+
imageAction.appendChild(closeTile);
|
|
2004
2155
|
imgResizer.appendChild(imageAction);
|
|
2156
|
+
stickImage.addEventListener("click", () => {
|
|
2157
|
+
imgResizer.classList.add("stickImage");
|
|
2158
|
+
Array.from(imgResizer.children).forEach((child) => {
|
|
2159
|
+
if (child.tagName.toLowerCase() !== "img") {
|
|
2160
|
+
child.style.display = "none";
|
|
2161
|
+
}
|
|
2162
|
+
});
|
|
2163
|
+
removeElemet();
|
|
2164
|
+
});
|
|
2165
|
+
Unglue.addEventListener("click", () => {
|
|
2166
|
+
imgResizer.classList.remove("stickImage");
|
|
2167
|
+
Array.from(imgResizer.children).forEach((child) => {
|
|
2168
|
+
if (child.tagName.toLowerCase() !== "img") {
|
|
2169
|
+
child.style.display = "block";
|
|
2170
|
+
}
|
|
2171
|
+
});
|
|
2172
|
+
removeElemet();
|
|
2173
|
+
});
|
|
2174
|
+
DeleteButton.addEventListener("click", () => {
|
|
2175
|
+
imgResizer.remove();
|
|
2176
|
+
removeElemet();
|
|
2177
|
+
});
|
|
2178
|
+
WrapButton.addEventListener("click", (e2) => {
|
|
2179
|
+
const parentElement = imgResizer.parentElement;
|
|
2180
|
+
imgResizer.parentElement.innerHTML;
|
|
2181
|
+
const parentElementTageName = parentElement.tagName.toLowerCase();
|
|
2182
|
+
const spanElement = document.createElement("div");
|
|
2183
|
+
if (parentElementTageName == "div" && parentElement.id != "editor") {
|
|
2184
|
+
const collectorForNewElement = parentElement;
|
|
2185
|
+
Array.from(collectorForNewElement.attributes).forEach((attr) => {
|
|
2186
|
+
spanElement.setAttribute(attr.name, attr.value);
|
|
2187
|
+
});
|
|
2188
|
+
spanElement.innerHTML = collectorForNewElement.innerHTML;
|
|
2189
|
+
collectorForNewElement.innerHTML = "";
|
|
2190
|
+
collectorForNewElement.append(spanElement);
|
|
2191
|
+
} else {
|
|
2192
|
+
const collectorForNewElement = parentElement;
|
|
2193
|
+
spanElement.innerHTML = collectorForNewElement.innerHTML;
|
|
2194
|
+
collectorForNewElement.innerHTML = "";
|
|
2195
|
+
collectorForNewElement.append(spanElement);
|
|
2196
|
+
}
|
|
2197
|
+
removeElemet();
|
|
2198
|
+
ImageResizing();
|
|
2199
|
+
imageContainerClicked();
|
|
2200
|
+
});
|
|
2005
2201
|
floatLeftButton.addEventListener("click", () => {
|
|
2006
2202
|
imgResizer.style.float = "left";
|
|
2007
2203
|
removeElemet();
|
|
@@ -2029,6 +2225,7 @@ const _sfc_main = {
|
|
|
2029
2225
|
dropedImageRedirection(imgResizer);
|
|
2030
2226
|
});
|
|
2031
2227
|
imageClicked.value = false;
|
|
2228
|
+
handleClickOutside();
|
|
2032
2229
|
}
|
|
2033
2230
|
onMounted(() => {
|
|
2034
2231
|
onMountedFunctionsset();
|
|
@@ -2090,26 +2287,6 @@ const _sfc_main = {
|
|
|
2090
2287
|
removeElemet();
|
|
2091
2288
|
const range = savedRange2.value["range"];
|
|
2092
2289
|
if (range) {
|
|
2093
|
-
let initResize2 = function(e, type) {
|
|
2094
|
-
e.preventDefault();
|
|
2095
|
-
currentResizer = type;
|
|
2096
|
-
window.addEventListener("mousemove", resize);
|
|
2097
|
-
window.addEventListener("mouseup", stopResize);
|
|
2098
|
-
}, resize = function(e) {
|
|
2099
|
-
const rect = imgResizer.getBoundingClientRect();
|
|
2100
|
-
if (currentResizer === "width" || currentResizer === "both") {
|
|
2101
|
-
const newWidth = e.clientX - rect.left;
|
|
2102
|
-
imgResizer.style.width = newWidth + "px";
|
|
2103
|
-
imgElement.style.width = newWidth + "px";
|
|
2104
|
-
}
|
|
2105
|
-
if (currentResizer === "height" || currentResizer === "both") {
|
|
2106
|
-
const newHeight = e.clientY - rect.top;
|
|
2107
|
-
imgElement.style.height = newHeight + "px";
|
|
2108
|
-
}
|
|
2109
|
-
}, stopResize = function() {
|
|
2110
|
-
window.removeEventListener("mousemove", resize);
|
|
2111
|
-
window.removeEventListener("mouseup", stopResize);
|
|
2112
|
-
};
|
|
2113
2290
|
const imgElement = document.createElement("img");
|
|
2114
2291
|
imgElement.src = imageUrl;
|
|
2115
2292
|
imgElement.style.maxWidth = "100%";
|
|
@@ -2121,6 +2298,7 @@ const _sfc_main = {
|
|
|
2121
2298
|
imgResizer.style.position = "relative";
|
|
2122
2299
|
imgResizer.contentEditable = false;
|
|
2123
2300
|
imgResizer.classList.add("resizer-image-dropped");
|
|
2301
|
+
imgResizer.id = Date.now();
|
|
2124
2302
|
dropedImageRedirection(imgResizer);
|
|
2125
2303
|
const widthResizer = document.createElement("div");
|
|
2126
2304
|
widthResizer.style.width = "10px";
|
|
@@ -2132,6 +2310,7 @@ const _sfc_main = {
|
|
|
2132
2310
|
widthResizer.style.cursor = "ew-resize";
|
|
2133
2311
|
widthResizer.style.zIndex = "2";
|
|
2134
2312
|
widthResizer.classList.add("hideOnprint");
|
|
2313
|
+
widthResizer.classList.add("widthResizer");
|
|
2135
2314
|
widthResizer.setAttribute("contentEditable", false);
|
|
2136
2315
|
const heightResizer = document.createElement("div");
|
|
2137
2316
|
heightResizer.style.width = "100%";
|
|
@@ -2143,6 +2322,7 @@ const _sfc_main = {
|
|
|
2143
2322
|
heightResizer.style.cursor = "ns-resize";
|
|
2144
2323
|
heightResizer.style.zIndex = "2";
|
|
2145
2324
|
heightResizer.classList.add("hideOnprint");
|
|
2325
|
+
heightResizer.classList.add("heightResizer");
|
|
2146
2326
|
heightResizer.setAttribute("contentEditable", false);
|
|
2147
2327
|
const cornerResizer = document.createElement("div");
|
|
2148
2328
|
cornerResizer.style.width = "20px";
|
|
@@ -2154,6 +2334,7 @@ const _sfc_main = {
|
|
|
2154
2334
|
cornerResizer.style.cursor = "nwse-resize";
|
|
2155
2335
|
cornerResizer.style.zIndex = "10";
|
|
2156
2336
|
cornerResizer.setAttribute("contentEditable", false);
|
|
2337
|
+
cornerResizer.classList.add("cornerResizer");
|
|
2157
2338
|
imgResizer.appendChild(imgElement);
|
|
2158
2339
|
imgResizer.appendChild(widthResizer);
|
|
2159
2340
|
imgResizer.appendChild(heightResizer);
|
|
@@ -2164,12 +2345,23 @@ const _sfc_main = {
|
|
|
2164
2345
|
}
|
|
2165
2346
|
selectedImage = imgResizer;
|
|
2166
2347
|
});
|
|
2167
|
-
widthResizer.addEventListener("mousedown", (e) => initResize2(e, "width"));
|
|
2168
|
-
heightResizer.addEventListener("mousedown", (e) => initResize2(e, "height"));
|
|
2169
|
-
cornerResizer.addEventListener("mousedown", (e) => initResize2(e, "both"));
|
|
2170
2348
|
range.insertNode(imgResizer);
|
|
2171
|
-
|
|
2349
|
+
const parentElement = range.commonAncestorContainer;
|
|
2350
|
+
const parentNode = parentElement.nodeType === Node.TEXT_NODE ? parentElement.parentNode : parentElement;
|
|
2351
|
+
if (parentNode.id == "editor") {
|
|
2352
|
+
const originalElement = editorRef.value.innerHTML;
|
|
2353
|
+
editorRef.value.innerHTML = null;
|
|
2354
|
+
const wrapperContainer = document.createElement("div");
|
|
2355
|
+
wrapperContainer.innerHTML = originalElement;
|
|
2356
|
+
range.deleteContents();
|
|
2357
|
+
range.insertNode(wrapperContainer);
|
|
2358
|
+
const newRange = document.createRange();
|
|
2359
|
+
const selection = window.getSelection();
|
|
2360
|
+
selection.removeAllRanges();
|
|
2361
|
+
newRange.collapse(true);
|
|
2362
|
+
}
|
|
2172
2363
|
imageContainerClicked();
|
|
2364
|
+
ImageResizing();
|
|
2173
2365
|
returnData();
|
|
2174
2366
|
}
|
|
2175
2367
|
}
|
|
@@ -2182,12 +2374,7 @@ const _sfc_main = {
|
|
|
2182
2374
|
}
|
|
2183
2375
|
function undoOrRedo(acting) {
|
|
2184
2376
|
const action = UndoRedo[acting]();
|
|
2185
|
-
|
|
2186
|
-
if (action) {
|
|
2187
|
-
editorRef.value.innerHTML = action;
|
|
2188
|
-
returnData();
|
|
2189
|
-
}
|
|
2190
|
-
}, 100);
|
|
2377
|
+
editorRef.value.innerHTML = action;
|
|
2191
2378
|
}
|
|
2192
2379
|
return (_ctx, _cache) => {
|
|
2193
2380
|
return openBlock(), createElementBlock("span", _hoisted_1, [
|
|
@@ -2493,7 +2680,7 @@ const _sfc_main = {
|
|
|
2493
2680
|
createElementVNode("div", _hoisted_127, [
|
|
2494
2681
|
createElementVNode("button", {
|
|
2495
2682
|
style: { "flex": "1", "margin": "0 4px", "width": "auto" },
|
|
2496
|
-
onClick: _cache[38] || (_cache[38] = ($event) => ChangeTheDirectionOFTextFun("
|
|
2683
|
+
onClick: _cache[38] || (_cache[38] = ($event) => ChangeTheDirectionOFTextFun("float", "left", "", "p"))
|
|
2497
2684
|
}, _hoisted_129),
|
|
2498
2685
|
createElementVNode("button", {
|
|
2499
2686
|
style: { "flex": "1", "margin": "0 4px", "width": "auto" },
|
|
@@ -2501,7 +2688,7 @@ const _sfc_main = {
|
|
|
2501
2688
|
}, _hoisted_131),
|
|
2502
2689
|
createElementVNode("button", {
|
|
2503
2690
|
style: { "flex": "1", "margin": "0 4px", "width": "auto" },
|
|
2504
|
-
onClick: _cache[40] || (_cache[40] = ($event) => ChangeTheDirectionOFTextFun("
|
|
2691
|
+
onClick: _cache[40] || (_cache[40] = ($event) => ChangeTheDirectionOFTextFun("float", "right", "", "p"))
|
|
2505
2692
|
}, _hoisted_133),
|
|
2506
2693
|
createElementVNode("button", {
|
|
2507
2694
|
style: { "flex": "1", "margin": "0 4px", "width": "auto" },
|
|
@@ -2573,30 +2760,38 @@ const _sfc_main = {
|
|
|
2573
2760
|
style: { "margin": "6px" }
|
|
2574
2761
|
}, _hoisted_166),
|
|
2575
2762
|
createElementVNode("div", _hoisted_167, [
|
|
2576
|
-
_hoisted_168,
|
|
2577
|
-
|
|
2763
|
+
createElementVNode("div", _hoisted_168, [
|
|
2764
|
+
_hoisted_169,
|
|
2578
2765
|
createElementVNode("div", _hoisted_170, [
|
|
2579
|
-
(
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2766
|
+
createElementVNode("div", _hoisted_171, [
|
|
2767
|
+
createElementVNode("div", _hoisted_172, [
|
|
2768
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(colors.value, (col) => {
|
|
2769
|
+
return openBlock(), createElementBlock("div", {
|
|
2770
|
+
class: "color-box",
|
|
2771
|
+
style: normalizeStyle(`background-color: #${col} ;`),
|
|
2772
|
+
onClick: (e) => styleElementIncluderFun("background", `#${col}`, "", "span")
|
|
2773
|
+
}, null, 12, _hoisted_173);
|
|
2774
|
+
}), 256))
|
|
2775
|
+
])
|
|
2776
|
+
])
|
|
2586
2777
|
])
|
|
2587
2778
|
])
|
|
2588
2779
|
]),
|
|
2589
|
-
createElementVNode("div",
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
createElementVNode("div",
|
|
2593
|
-
(
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2780
|
+
createElementVNode("div", _hoisted_174, [
|
|
2781
|
+
createElementVNode("div", _hoisted_175, [
|
|
2782
|
+
_hoisted_176,
|
|
2783
|
+
createElementVNode("div", _hoisted_177, [
|
|
2784
|
+
createElementVNode("div", _hoisted_178, [
|
|
2785
|
+
createElementVNode("div", _hoisted_179, [
|
|
2786
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(colors.value, (col) => {
|
|
2787
|
+
return openBlock(), createElementBlock("div", {
|
|
2788
|
+
class: "color-box",
|
|
2789
|
+
style: normalizeStyle(`background-color: #${col} ;`),
|
|
2790
|
+
onClick: (e) => styleElementIncluderFun("color", `#${col}`, "", "span")
|
|
2791
|
+
}, null, 12, _hoisted_180);
|
|
2792
|
+
}), 256))
|
|
2793
|
+
])
|
|
2794
|
+
])
|
|
2600
2795
|
])
|
|
2601
2796
|
])
|
|
2602
2797
|
]),
|
|
@@ -2606,35 +2801,32 @@ const _sfc_main = {
|
|
|
2606
2801
|
st: "",
|
|
2607
2802
|
yle: "flex: 1; margin: 0 4px; text-align: center;padding-top:8px ;",
|
|
2608
2803
|
onClick: _cache[53] || (_cache[53] = () => undoOrRedo("Undo"))
|
|
2609
|
-
},
|
|
2804
|
+
}, _hoisted_182),
|
|
2610
2805
|
createElementVNode("div", {
|
|
2611
2806
|
title: "Redo",
|
|
2612
2807
|
class: "hover:bg-gray-200 bg-gray-50 hover:text-gray-700 elemeSet items-center text-center justify-baseline rounded cursor-pointer text-md p-0 m-1",
|
|
2613
2808
|
st: "",
|
|
2614
2809
|
yle: "flex: 1; margin: 0 4px; text-align: center;padding-top:8px ;",
|
|
2615
2810
|
onClick: _cache[54] || (_cache[54] = () => undoOrRedo("Redo"))
|
|
2616
|
-
},
|
|
2811
|
+
}, _hoisted_184),
|
|
2617
2812
|
createElementVNode("div", {
|
|
2618
2813
|
title: "new fresh line",
|
|
2619
2814
|
class: "hover:bg-gray-200 bg-gray-50 hover:text-gray-700 elemeSet items-center text-center justify-baseline rounded cursor-pointer text-md p-0 m-1",
|
|
2620
2815
|
st: "",
|
|
2621
2816
|
yle: "flex: 1; margin: 0 4px; text-align: center;padding-top:8px ;",
|
|
2622
2817
|
onClick: _cache[55] || (_cache[55] = ($event) => insertNewLineAtCursorFun())
|
|
2623
|
-
},
|
|
2624
|
-
createElementVNode("div",
|
|
2625
|
-
createElementVNode("div",
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
}, toDisplayString(size) + "pt", 9, _hoisted_188);
|
|
2636
|
-
}), 64))
|
|
2637
|
-
])
|
|
2818
|
+
}, _hoisted_186),
|
|
2819
|
+
createElementVNode("div", _hoisted_187, [
|
|
2820
|
+
createElementVNode("div", _hoisted_188, [
|
|
2821
|
+
_hoisted_189,
|
|
2822
|
+
createElementVNode("div", _hoisted_190, [
|
|
2823
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(50, (size) => {
|
|
2824
|
+
return createElementVNode("div", {
|
|
2825
|
+
class: "pom-editor-menu-fonts",
|
|
2826
|
+
onClick: (e) => styleElementIncluderFun("font-size", size + "pt"),
|
|
2827
|
+
key: size
|
|
2828
|
+
}, toDisplayString(size) + " pt", 9, _hoisted_191);
|
|
2829
|
+
}), 64))
|
|
2638
2830
|
])
|
|
2639
2831
|
])
|
|
2640
2832
|
]),
|
|
@@ -2647,9 +2839,13 @@ const _sfc_main = {
|
|
|
2647
2839
|
ref_key: "pomTextEditorContainer",
|
|
2648
2840
|
ref: pomTextEditorContainer,
|
|
2649
2841
|
id: "pom-texedito-container",
|
|
2650
|
-
style: { "width": "100%", "overflow": "hidden auto", "
|
|
2842
|
+
style: { "width": "100%", "overflow": "hidden auto", "border": "1px solid #9d969633", "padding": "0px", "border-radius": "3px" }
|
|
2651
2843
|
}, [
|
|
2652
|
-
createElementVNode("div",
|
|
2844
|
+
createElementVNode("div", {
|
|
2845
|
+
width: "128",
|
|
2846
|
+
height: "128",
|
|
2847
|
+
style: normalizeStyle(`max-height:${props.maxHeight} ;min-height:15vh ;text-align: justify;`)
|
|
2848
|
+
}, [
|
|
2653
2849
|
__props.TextOnly ? (openBlock(), createElementBlock("textarea", {
|
|
2654
2850
|
key: 0,
|
|
2655
2851
|
onMouseup: _cache[56] || (_cache[56] = ($event) => containerCursorPosition()),
|
|
@@ -2678,22 +2874,22 @@ const _sfc_main = {
|
|
|
2678
2874
|
contenteditable: "true",
|
|
2679
2875
|
id: "editor",
|
|
2680
2876
|
style: { "height": "100%", "width": "100%", "border": "none" }
|
|
2681
|
-
}, null, 40,
|
|
2682
|
-
])
|
|
2877
|
+
}, null, 40, _hoisted_192))
|
|
2878
|
+
], 4)
|
|
2683
2879
|
], 512),
|
|
2684
|
-
__props.TextOnly != "true" ? (openBlock(), createElementBlock("div",
|
|
2880
|
+
__props.TextOnly != "true" ? (openBlock(), createElementBlock("div", _hoisted_193, [
|
|
2685
2881
|
createElementVNode("div", {
|
|
2686
2882
|
class: "hover:bg-gray-200",
|
|
2687
2883
|
onClick: _cache[60] || (_cache[60] = ($event) => insertNewLineAtCursorFun())
|
|
2688
|
-
},
|
|
2689
|
-
|
|
2690
|
-
|
|
2884
|
+
}, _hoisted_196),
|
|
2885
|
+
_hoisted_197,
|
|
2886
|
+
_hoisted_198
|
|
2691
2887
|
])) : createCommentVNode("", true)
|
|
2692
2888
|
]);
|
|
2693
2889
|
};
|
|
2694
2890
|
}
|
|
2695
2891
|
};
|
|
2696
|
-
const Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
2892
|
+
const Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a5098aef"]]);
|
|
2697
2893
|
export {
|
|
2698
2894
|
Editor as default
|
|
2699
2895
|
};
|