pom-text-editor-react
Version:
**PomTextEditor**
156 lines (135 loc) • 48.9 kB
JavaScript
(function(e,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react"],b):(e=typeof globalThis<"u"?globalThis:e||self,e.CustomHookNpmTest2=b(e.jsxRuntime,e.React))})(this,function(e,b){"use strict";function z(){const r=window.getSelection();if(r.rangeCount>0){const l=r.getRangeAt(0),o=l.startOffset;document.getElementById("cursorPosition").textContent=o;const s=l.startContainer;if(s.nodeType===Node.TEXT_NODE){const t=s.textContent.substring(o,o+1);document.getElementById("textAtCursor").textContent=t}else document.getElementById("textAtCursor").textContent="No text here"}}function B(){const r=window.getSelection();if(r.rangeCount>0)return{range:r.getRangeAt(0).cloneRange(),selection:r}}function E(r){try{let l=function(c){const f=c.clientX-d,h=c.clientY-n;t.style&&(t.style.width=`${i+f}px`,t.style.height=`${a+h}px`,t.style.minWidth="50px",t.style.minHeight="50px");const p=t.querySelector("img");p!=null&&p.style&&(p.style.width="100%")},o=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",o)};r.preventDefault();const t=r.target.parentElement,d=r.clientX,n=r.clientY,i=parseFloat(window.getComputedStyle(t).width),a=parseFloat(window.getComputedStyle(t).height);document.addEventListener("mousemove",l),document.addEventListener("mouseup",o)}catch{}}var w;function H(r,l,o){try{const[s,t]=l.textContent.split(" x ").map(Number),d=j(r,t,s,o)}catch{}}function S(r,l,o){try{const s=Array.from(o.children).indexOf(r.target),t=s%10+1,d=Math.floor(s/10)+1;Array.from(o.children).forEach((n,i)=>{i<=s?n.style.backgroundColor="#1f9296":n.style.backgroundColor="#737979"}),l.textContent=`${t} x ${d}`}catch{}}function I(r,l,o,s){try{for(w=r;o.firstChild;){const t=o.firstChild;t.removeEventListener("mouseover",S),t.removeEventListener("click",H),o.removeChild(t)}for(let t=0;t<100;t++){const d=document.createElement("div");d.addEventListener("mouseover",n=>S(n,s,o)),d.addEventListener("click",()=>H(l,s,w)),o.appendChild(d)}}catch{}}function j(r,l=2,o=2){try{const s=w==null?void 0:w.range;if(s){const t=w.selection,d=document.createElement("div");d&&(d.classList.add("pom-table-editor-container"),d.style.display="flex");const n=document.createElement("table");n&&(n.style.border="1px solid black",n.style.borderCollapse="collapse",n.classList.add("pom-table-editor"));for(let c=0;c<l;c++){const f=document.createElement("tr");for(let h=0;h<o;h++){const p=document.createElement("td");p&&(p.style.border="1px solid black",p.style.padding="5px",p.textContent=`Row ${c+1}, Cell ${h+1}`);const g=document.createElement("div");g&&(g.style.width="5px",g.style.height="100%",g.style.position="absolute",g.style.right="0",g.style.top="0",g.style.cursor="col-resize",g.style.userSelect="none",g.addEventListener("mousedown",E)),p&&(p.style.position="relative"),p.appendChild(g),f.appendChild(p)}n.appendChild(f)}d.appendChild(n),n.addEventListener("contextmenu",function(c){c.preventDefault(),D(c,n,d)}),s.deleteContents(),s.insertNode(d);const i=n.querySelector("td"),a=document.createRange();return a.setStart(i,0),a.collapse(!0),t.addRange(a),w=a.cloneRange(),r.focus(),w}}catch{}}function D(r,l,o){try{const s=document.getElementById("custom-context-menu");s&&document.body.removeChild(s);const t=document.createElement("div");t&&(t.id="custom-context-menu",t.style.position="absolute",t.style.backgroundColor="white",t.style.border="1px solid #ccc",t.style.padding="10px",t.style.boxShadow="0 2px 10px rgba(0, 0, 0, 0.2)",t.style.zIndex="1000",t.style.left=`${r==null?void 0:r.pageX}px`,t.style.top=`${r==null?void 0:r.pageY}px`),[{text:"Delete Table",action:()=>o.remove()},{text:"Toggle Borders",action:()=>{if(l){const n=l.style.border!=="";l.style.border=n?"":"1px solid black",l.style.borderCollapse="collapse",l.querySelectorAll("td").forEach(i=>{i.style.border=n?"":"1px solid black"})}}},{text:"Color Table",action:()=>{const n=document.createElement("input");n&&(n.type="color",n.style.marginTop="5px",n.addEventListener("input",()=>{l.style.backgroundColor=n.value}));const i=document.createElement("input");i&&(i.type="color",i.style.marginTop="5px",i.addEventListener("input",()=>{l.style.color=i.value})),t&&(t.appendChild(document.createTextNode("Background Color:")),t.appendChild(n),t.appendChild(document.createTextNode("Text Color:")),t.appendChild(i))}},{text:"Add Row",action:()=>{const n=document.createElement("tr"),i=l.rows[0].cells.length;for(let a=0;a<i;a++){const c=document.createElement("td");c.style.border="1px solid black",c.style.padding="5px",c.textContent=`Row ${l.rows.length+1}, Cell ${a+1}`,n.appendChild(c)}l.appendChild(n)}},{text:"Add Column",action:()=>{for(let n=0;n<l.rows.length;n++){const i=document.createElement("td");i.style.border="1px solid black",i.style.padding="5px",i.textContent=`Row ${n+1}, Cell ${l.rows[n].cells.length+1}`,l.rows[n].appendChild(i)}}}].forEach(n=>{const i=document.createElement("div");i.textContent=n.text,i.style.cursor="pointer",i.addEventListener("click",n.action),t.appendChild(i)}),document.body.appendChild(t),document.addEventListener("click",function n(){t&&document.body.removeChild(t),document.removeEventListener("click",n)})}catch{}}function M(r,l="strong",o="*bold text here *",s=[]){if(r){const t=window.getSelection();t.removeAllRanges(),t.addRange(r);const d=t.getRangeAt(0),n=`${d.toString()}`.trim(),i=d.cloneContents();if(typeof l=="string"&&l.trim()!==""){const a=document.createElement(l);a.style.paddingLeft="7px",a.contenteditable=!1,s&&s.forEach(p=>{const{attr:g,value:y,keyin:m}=p;a.setAttribute(g,y)}),a.appendChild(i),a.innerHTML=n.length>0?a.innerHTML:o;const c=document.createElement("span"),f=document.createElement("span");c.innerHTML=" ",f.innerHTML=" ",r.deleteContents(),r.insertNode(c),r.insertNode(a),r.insertNode(f);const h=document.createRange();h.setStartAfter(f),h.collapse(!0),t.removeAllRanges(),t.addRange(h),r=h.cloneRange()}else console.error("Invalid element type:",l)}else console.log("No saved range available. Make sure the cursor position is saved before calling this function.")}function _(r,l,o="span",s="datetime-local",t={},d=[]){const n=document.getElementById("Pom-openInputToFeed"+s);n&&n.remove();const i=document.createElement("div"),a=document.createElement("input");i.id="custom-context-menu",i.style.position="absolute",i.style.backgroundColor="white",i.style.border="1px solid #ccc",i.style.padding="10px",i.style.boxShadow="0 2px 10px rgba(0, 0, 0, 0.2)",i.style.zIndex="1000",i.style.left=`${l==null?void 0:l.pageX}px`,i.style.top=`${l==null?void 0:l.pageY}px`,a.id="Pom-openInputToFeed"+s,a.classList.add("Pom-openInputToFeed"),a.type=s,a.style.cssText=t,i.appendChild(a);const c=document.getElementById("toolbar");c&&c.appendChild(i),a.addEventListener("change",function(){const p=`${this.value}`;if(s==="datetime-local")M(r,o,p.replace(/T/," "));else{let y=[];for(const m in d)if(d.hasOwnProperty(m))if(m.toLowerCase()==="href")y.push({attr:m,value:p});else{const k=d[m];y.push({attr:m,value:k})}M(r,o,"**link Name** ",y)}i.remove(),window.document.removeEventListener("click",f);const g=document.getElementsByClassName("pom-editor-anchor-tag");for(let y=0;y<g.length;y++)g[y].addEventListener("click",h)});function f(p){i.contains(p.target)||(i.remove(),window.document.removeEventListener("click",f))}function h(p){p.preventDefault();const g=this.href;window.open(g,"_blank"),window.document.removeEventListener("click",h)}}function W(r,l,o,s,t="",d="div"){if(!r){console.warn("No saved range available. Ensure the cursor position is saved before calling this function.");return}const n=window.getSelection();n.removeAllRanges(),n.addRange(r);const i=n.getRangeAt(0),a=i.cloneContents(),c=i.commonAncestorContainer,f=c.nodeType===Node.TEXT_NODE?c.parentNode:c;let h,p;f.id==="editor"?(h=document.createElement(d),h.appendChild(a),p=h.innerHTML.replace("text-align","note"),r.deleteContents()):(h=f.cloneNode(),p=h.innerHTML);const g=h.style[o]||"",y=new RegExp(t,"ig"),m=s.replace(y,"")+t;g.includes(m)?h.style[o]=g.replace(m,""):h.style[o]=(g+m).trim();const k=document.createElement("span"),C=document.createElement("span");k.innerHTML=" ",C.innerHTML=" ",h.innerHTML=p,r.insertNode(k),r.insertNode(h),r.insertNode(C);const v=document.createRange();v.collapse(!0),n.removeAllRanges(),n.addRange(v),r=v.cloneRange(),l.focus()}function $(r,l=2,o="list-style"){if(r){const s=window.getSelection();s.removeAllRanges(),s.addRange(r);const t=document.createElement("ul");t.style.listStyle=o,t.style.paddingLeft="73px";for(let i=0;i<l;i++){const a=document.createElement("li");a.style.padding="5px",a.textContent=`li ${i+1}, `,a.style.position="relative",t.appendChild(a)}r.deleteContents(),r.insertNode(t);const d=t.querySelector("li"),n=document.createRange();n.setStart(d,0),n.collapse(!0),s.removeAllRanges(),s.addRange(n),r=n.cloneRange()}}function G(r){r.preventDefault();const o=r.target.parentElement,s=document.getElementById("editor"),t=r.clientX,d=r.clientY,n=parseFloat(window.getComputedStyle(o).left)||0,i=parseFloat(window.getComputedStyle(o).top)||0,a=s.offsetWidth,c=s.offsetHeight,f=o.offsetWidth,h=o.offsetHeight;function p(y){const m=y.clientX-t,k=y.clientY-d;let C=n+m,v=i+k;C<0?C=0:C+f>a&&(C=a-f),v<0?v=0:v+h>c&&(v=c-h),o.style.left=`${C}px`,o.style.top=`${v}px`;const x=a/2,N=c/2,L=C+f/2,F=v+h/2;Math.abs(L-x)<1&&Math.abs(F-N)<1&&alert("Container is centered!")}function g(){document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",g)}document.addEventListener("mousemove",p),document.addEventListener("mouseup",g)}function P(r,l){try{const o=document.createElement("div");o.style.width="20px",o.style.height="20px",o.style.background="rgba(0, 0, 0, 0.5)",o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.cursor="move",o.style.zIndex="11",o.classList.add(l),o.classList.add("hideonprint"),o.addEventListener("mousedown",s=>{G(s)}),r.appendChild(o)}catch(o){console.log(o)}}function O(r,l){if(r){const o=window.getSelection();o.removeAllRanges(),o.addRange(r);const s="Pom_Imge_EditorIn"+Date.now(),t=document.createElement("div");t.style.display="inline-flex",t.style.position="relative",t.style.width="200px",t.style.minHeight="40px",t.classList.add(s),t.classList.add("hideOnprint"),t.classList.add("pom-4-imageContainer"),t.id=s,t.setAttribute("contenteditable",!1);const d=document.createElement("img");d.style.padding="5px",d.style.width="100%",d.src=l,d.style.display="block",d.classList.add(s),d.setAttribute("contenteditable",!1);const n=document.createElement("div");n.style.width="20px",n.style.height="20px",n.style.background="gray",n.style.position="absolute",n.style.right="0",n.style.bottom="0",n.style.cursor="nwse-resize",n.style.zIndex="10",n.classList.add(s),n.setAttribute("contenteditable",!1),n.classList.add("hideOnprint"),n.addEventListener("mousedown",E),t.appendChild(d),t.appendChild(n),P(t,s),r.deleteContents(),r.insertNode(t);const i=document.createRange();i.setStartAfter(d),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r=i.cloneRange();let a=document.getElementsByClassName(s);for(let c=0;c<a.length;c++)a[c].addEventListener("keyup",function(h){})}}async function X(r,l){const o=r.target.files||r.dataTransfer.files;if(o.length){for(const s in o)if(o.hasOwnProperty(s)){const t=o[s],d=await U(t);O(l,d)}}}function U(r){return new Promise((l,o)=>{const s=new FileReader;s.onloadend=()=>l(s.result),s.onerror=t=>o(t),s.readAsDataURL(r)})}function q(r,l,o,s,t="",d="span"){try{if(r){const n=window.getSelection();n.removeAllRanges(),n.addRange(r);const i=n.getRangeAt(0),a=`${i}`.toString().trim(),c=i.cloneContents();if(typeof d=="string"&&d.trim()!==""){const f=document.createElement(d);f.appendChild(c),console.log(f.innerHTML);const h=new RegExp(t,"ig");f.style[o]=s.replace(h,"")+t;let p="text here";o=="background"?p=f.innerHTML.replace("background","note"):p=f.innerHTML,f.innerHTML=(a.length>0,p);const g=document.createElement("span"),y=document.createElement("span");g.innerHTML=" ",y.innerHTML=" ",r.deleteContents(),r.insertNode(g),r.insertNode(f),r.insertNode(y);const m=document.createRange();m.setStartAfter(y),m.collapse(!0),n.removeAllRanges(),n.addRange(m),r=m.cloneRange(),l.focus()}else console.error("Invalid element type:",d)}else console.log("No saved range available. Make sure the cursor position is saved before calling this function.")}catch{}}function Y(r){const l=document.createElement("div");l.textContent="NeW line ",r.appendChild(l),l.focus()}function A(r=!1,l=document.getElementsByClassName("pom-table-editor-container")){l=Array.from(l),l.forEach(o=>{if(r){const s=o.style.display==="flex"?"none":"flex";o.style.display=s;return}o.remove()})}function K(r=document.getElementById("pom-texedito-container").innerHTML,l=".hideonprint"){const o=window.open("","","height=900,width=800");o.document.write("<html><head><title>Print</title>"),o.document.write(`<style>
${l} {
display: none;
}
@media print {
${l} {
display: none;
}
}
.pom-4-imageContainer {
display: block !important;
}
</style>`),o.document.write("</head><body>"),o.document.write(r),o.document.write("</body></html>"),o.document.close();const s=o.document.querySelectorAll(".pom-4-imageContainer");return Z(s),o}function Z(r=document.querySelectorAll(".pom-4-imageContainer")){r&&r.forEach(function(l){const o=l.querySelector("img"),s=l.getAttribute("style");s?o.style.cssText=s+"; position: initial":o.style.position="initial",l.style.display="block",parseInt(l.style.left,10)>793.7&&(l.style.left="793.7px")})}function J(r=document.getElementById("pom-texedito-container")){return Z(r.querySelectorAll(".pom-4-imageContainer")),R()+r.innerHTML}function Q(r=!0,l=document.getElementById("pom-texedito-container").innerHTML,o="hideonprint"){const s=K(l,o);r&&(s.focus(),s.onload=function(){s.print()},s.onafterprint=function(){s.close()})}function R(){return`<style scoped>
.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: rgb(244, 244, 244);
cursor: pointer;
user-select: none;
width: max-content;
display: none;
left: 85% !important;
top: -7px;
/* Hidden by default */
}
.table-picker-container.hidden {
/* display: none; */
}
.table-picker-wrapper:hover .table-picker-container {
display: block;
/* Show on hover */
}
.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: rgb(248, 246, 246);
border: 0;
}
.table-dimensions {
font-size: 12px;
color: #333;
}
.pomXEditor {
border: 1px;
border-style: solid;
border-color: #6972734e;
}
#editor:focus {
outline: none;
border: none;
/* Removes any custom borders if applied */
}
.pom-table-editor-container {
display: flex;
}
a {
color: blue;
/* Default color of the link text */
text-decoration: underline;
/* Underline the link text by default */
cursor: pointer;
/* Cursor changes to a pointer on hover */
}
/* Additional pseudo-classes for different link states */
a:link {
color: blue;
/* Color of unvisited link */
}
a:visited {
color: purple;
/* Color of visited link */
}
a:hover {
color: red;
/* Color when the link is hovered over */
text-decoration: none;
/* Typically remove underline on hover */
}
a:active {
color: orange;
/* Color when the link is clicked */
}
@media print {
.print-container {
/* width: 100%;
height: auto;
overflow: hidden;
page-break-inside: avoid;
margin: 0;
padding: 0;
box-sizing: border-box; */
}
/* Optional: Set the font size for better print readability */
/* body {
font-size: 12pt;
} */
/* Optional: Ensure images or other elements fit within the print area */
/* img {
max-width: 100%;
height: auto;
} */
.hideonprint {
display: none !important;
}
* {
overflow: hidden;
/* Hide scrollbar */
}
}
</style>`}const ee=({Dvalue:r,change:l,toolbarAfter:o,toolbarBefore:s})=>{const[t,d]=b.useState(null),n=b.useRef(null),i=b.useRef(null),a=b.useRef(null),c=b.useRef(null),f=b.useRef(null),[h,p]=b.useState(["FF5733","33FF57","3357FF","FFFF33","FF33FF","33FFFF","5733FF","57FF33","FF3333","33FF33","3333FF","FF33AA","33AAFF","AAFF33","FFAA33","AA33FF","33FFAA","AAFFAA","FFAAFF","40E0D0","FFD700","8A2BE2","DC143C","00CED1","7FFF00","FF4500","DAA520","6A5ACD","FF1493","B8860B","4682B4","D2691E","ADFF2F","5F9EA0","FF69B4","7B68EE","00FF7F","20B2AA","33FC57","FAAFF33","FFC700","8A2BE7","7FFFD4","FF4590","6A5BCD","FFB6C1","FF7F50","6495ED","00FF00","FF8C00","00FA9A","D8BFD8","2E8B57","FF6347","F0E68C","E6E6FA","B22222"]);function g(...u){try{var T=document.querySelectorAll(".removeinlineblock");T.forEach(function(V){V.style.display="block"}),Q(...u,i.current.innerHTML)}catch{}}function y(...u){W(t==null?void 0:t.range,n.current,...u)}function m(...u){q(t==null?void 0:t.range,n.current,...u)}function k(u){X(u,t==null?void 0:t.range)}function C(...u){_(t==null?void 0:t.range,...u)}function v(){Y(n.current)}function x(...u){M(t==null?void 0:t.range,...u)}function N(...u){console.log(t,"savedRangesavedRangesavedRange"),$(t==null?void 0:t.range,...u)}function L(){d(B()),z(),I(t,n.current,c.current,f.current)}function F(){const u=J(n.current);setTimeout(()=>{typeof l=="function"&&l(u)},400)}function re(u){n.current.focus(),F(),n.current.innerHTML=r||""}return b.useEffect(()=>{re()},[]),e.jsxs("div",{children:[e.jsx("div",{style:{width:"100%"},id:"fullTextEditor",children:e.jsxs("div",{className:" hideonprint bg-gray-100 items-center",id:"toolbar",children:[e.jsxs("div",{className:"flex flex space-x-2 items-center",children:[e.jsx("div",{className:" items-center border-1 b g-gray-200 rounded cursor-pointer",children:e.jsxs("div",{className:"relative inline-block text-left group z-10 border-0 ",children:[e.jsxs("div",{className:"w-full flex rounded-md",children:[e.jsx("button",{type:"button",className:"inline-flex justify-start border-none w-full rounded-md border shadow-sm text-sm font-medium",id:"menu-button","aria-expanded":!0,"aria-haspopup":!0,children:e.jsx("div",{className:"py-1 w border-1 w-full text-start flex flex-wrap",children:e.jsx("span",{className:"cursor-pointer z-10 ml-1 my-1 rounded-full text-center text-sm font-bold text-gray-600",children:"View"})})}),e.jsx("div",{className:"items-center justify-end absolute inset-y-0 right-2 flex",children:e.jsx("svg",{className:"-mr-1 inline-flex justify-end ml-2 bg-gray-300 rounded-full",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),e.jsx("div",{className:"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",children:e.jsxs("div",{className:"",role:"none",children:[e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer",onClick:()=>g(!0),children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-print px-2"}),e.jsx("strong",{className:"px-3",children:"Print"})]}),e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-eye px-2"}),e.jsx("strong",{className:"px-3",onClick:()=>g(!1),children:"Preview"})]}),e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer",id:"fullscreenButton",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-expand-alt px-2"}),e.jsx("strong",{className:"px-3",children:"Fullscreen"})]})]})})]})}),e.jsx("div",{className:" items-center border-1 b g-gray-200 rounded cursor-pointer",children:e.jsxs("div",{className:"relative inline-block text-left group z-10 border-0 w-ful l ",children:[e.jsxs("div",{className:"w-full flex rounded-md",children:[e.jsx("button",{type:"button",className:"inline-flex justify-start border-none w-full rounded-md border shadow-sm text-sm font -medium",id:"menu-button","aria-expanded":!0,"aria-haspopup":!0,children:e.jsx("div",{className:"py-1 w borde r-1 w-full text-start in flex flex-wrap",children:e.jsx("span",{className:"cursor-pointer z-10 ml-1 my-1 rounded-full text-center text-sm font-bold text-gray-600",children:"Format"})})}),e.jsx("div",{className:"items-center justify-end absolute inset-y-0 right-2 flex",children:e.jsx("svg",{className:"-mr-1 inline-flex justify-end ml-2 bg-gray-300 rounded-full",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),e.jsx("div",{className:"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",children:e.jsxs("div",{className:"",role:"none",children:[e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",onClick:()=>x(),children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-bold px-2"}),e.jsx("strong",{className:"px-3",children:"Bold"})]}),e.jsxs("div",{onClick:()=>x("i","**italic text **"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-italic px-2"}),e.jsx("i",{className:"px-3",children:"italic"})]}),e.jsxs("div",{onClick:()=>x("u","**underLine text **"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-underline px-2"}),e.jsx("u",{className:"px-3",children:"underline"})]}),e.jsxs("div",{onClick:()=>x("s","**underLine text**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-strikethrough px-2"}),e.jsx("del",{className:"px-3",children:"strike"})]}),e.jsxs("div",{onClick:()=>x("sup","**supperScript**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-superscript px-2"}),e.jsx("sup",{className:"px-3",children:"superscript"})]}),e.jsxs("div",{onClick:()=>x("sub","**supperScript**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-subscript px-2"}),e.jsx("sub",{className:"px-3",children:"subscript"})]}),e.jsxs("div",{onClick:()=>x("summary","**summary**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-list px-2"}),e.jsx("summary",{className:"px-3",children:"summary"})]}),e.jsxs("div",{onClick:()=>x("ol","1. ordered list"),style:{backgroundColor:"#f3f4f6",cursor:"pointer"},className:"hover:bg-gray-200 elemeSet rounded",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-list-ol px-2"}),e.jsxs("strong",{style:{paddingLeft:"0.75rem"},children:["list manual"," "]})]}),e.jsxs("div",{onClick:()=>x("ul","1. unordered list"),style:{backgroundColor:"#f3f4f6",cursor:"pointer"},className:"hover:bg-gray-200 elemeSet rounded",children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-1x fa-list-ul px-2"}),e.jsxs("strong",{style:{paddingLeft:"0.75rem"},children:["list manual"," "]})]}),e.jsx("div",{className:"text-center",children:"Header"}),e.jsx("div",{onClick:()=>x("h1","**h1**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:e.jsx("i",{className:"px-3 fa-solid fa-heading",children:" H1"})}),e.jsx("div",{onClick:()=>x("h2","**h2**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:e.jsx("i",{className:"px-3 fa-solid fa-heading",children:" H2"})}),e.jsx("div",{onClick:()=>x("h3","**h3**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:e.jsx("i",{className:"px-3 fa-solid fa-heading",children:" H3"})}),e.jsx("div",{onClick:()=>x("h4","**h4**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:e.jsx("i",{className:"px-3 fa-solid fa-heading",children:" H4"})}),e.jsx("div",{onClick:()=>x("h5","**h5**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:e.jsx("i",{className:"px-3 fa-solid fa-heading",children:" H5"})}),e.jsx("div",{onClick:()=>x("h6","**h6**"),className:"hover:bg-gray-200 elemeSet rounded cursor-pointer text-md",children:e.jsx("i",{className:"px-3 fa-solid fa-heading",children:" H6"})}),e.jsxs("div",{className:"flex m-1 m-3 b g-gray-200 rounded cursor-pointer ",children:[e.jsx("input",{list:"fontSizes",onChange:()=>u=>m("fontSize",u.target.value,"px"),placeholder:"Size ",className:"p-1 border rounded w-[6vw] h-[3vh]"}),e.jsx("datalist",{id:"fontSizes"})]})]})})]})}),e.jsx("div",{className:"flex items-center border-1 b g-gray-200 rounded cursor-pointer",children:e.jsxs("div",{className:"relative inline-block text-left group z-10 border-0 w-ful l ",children:[e.jsxs("div",{className:"w-full flex rounded-md",children:[e.jsx("button",{type:"button",className:"inline-flex justify-start border-none w-full rounded-md border shadow-sm text-sm font -medium",id:"menu-button","aria-expanded":!0,"aria-haspopup":!0,children:e.jsx("div",{className:"py-1 w borde r-1 w-full text-start in flex flex-wrap",children:e.jsx("span",{className:"cursor-pointer z-10 ml-1 my-1 rounded-full text-center text-sm font-bold text-gray-600",children:"Insert"})})}),e.jsx("div",{className:"items-center justify-end absolute inset-y-0 right-2 flex",children:e.jsx("svg",{className:"-mr-1 inline-flex justify-end ml-2 bg-gray-300 rounded-full",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),e.jsx("div",{className:"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",children:e.jsxs("div",{className:"",role:"none",children:[e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer",style:{display:"flex"},children:[e.jsx("div",{style:{alignItems:"center",display:"flex"},className:"fa fa-1x fa-image px-2",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",width:"20",children:[e.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),e.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsxs("g",{id:"SVGRepo_iconCarrier",children:[e.jsx("path",{d:"M14.2647 15.9377L12.5473 14.2346C11.758 13.4519 11.3633 13.0605 10.9089 12.9137C10.5092 12.7845 10.079 12.7845 9.67922 12.9137C9.22485 13.0605 8.83017 13.4519 8.04082 14.2346L4.04193 18.2622M14.2647 15.9377L14.606 15.5991C15.412 14.7999 15.8149 14.4003 16.2773 14.2545C16.6839 14.1262 17.1208 14.1312 17.5244 14.2688C17.9832 14.4253 18.3769 14.834 19.1642 15.6515L20 16.5001M14.2647 15.9377L18.22 19.9628M18.22 19.9628C17.8703 20 17.4213 20 16.8 20H7.2C6.07989 20 5.51984 20 5.09202 19.782C4.7157 19.5903 4.40973 19.2843 4.21799 18.908C4.12583 18.7271 4.07264 18.5226 4.04193 18.2622M18.22 19.9628C18.5007 19.9329 18.7175 19.8791 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C20 18.4802 20 17.9201 20 16.8V13M11 4H7.2C6.07989 4 5.51984 4 5.09202 4.21799C4.7157 4.40973 4.40973 4.71569 4.21799 5.09202C4 5.51984 4 6.0799 4 7.2V16.8C4 17.4466 4 17.9066 4.04193 18.2622M18 9V6M18 6V3M18 6H21M18 6H15",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})," "]})]})}),e.jsx("div",{htmlFor:"pom43546535435445Image",className:"px-3",style:{paddingLeft:"7px"},children:"Image"}),e.jsx("input",{type:"file",hidden:!0,id:"pom43546535435445Image",accept:"image/*",multiple:!0,onChange:u=>k(u)})]}),e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer",style:{display:"flex",columnGap:"5"},onClick:()=>C(void 0,"a","links",{},{href:"",class:"pom-editor-anchor-tag",style:"text-decoration: underline;cursor: pointer"}),children:[e.jsx("div",{className:"fa fa-1x fa-anchor px-2",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",width:"20",children:[e.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),e.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsxs("g",{id:"SVGRepo_iconCarrier",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 6.75C13.75 7.7165 12.9665 8.5 12 8.5C11.0335 8.5 10.25 7.7165 10.25 6.75C10.25 5.7835 11.0335 5 12 5C12.9665 5 13.75 5.7835 13.75 6.75Z",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.75 8.5C12.75 8.08579 12.4142 7.75 12 7.75C11.5858 7.75 11.25 8.08579 11.25 8.5H12.75ZM11.25 11.125C11.25 11.5392 11.5858 11.875 12 11.875C12.4142 11.875 12.75 11.5392 12.75 11.125H11.25ZM9.375 10.375C8.96079 10.375 8.625 10.7108 8.625 11.125C8.625 11.5392 8.96079 11.875 9.375 11.875V10.375ZM12 11.875C12.4142 11.875 12.75 11.5392 12.75 11.125C12.75 10.7108 12.4142 10.375 12 10.375V11.875ZM14.625 11.875C15.0392 11.875 15.375 11.5392 15.375 11.125C15.375 10.7108 15.0392 10.375 14.625 10.375V11.875ZM12 10.375C11.5858 10.375 11.25 10.7108 11.25 11.125C11.25 11.5392 11.5858 11.875 12 11.875V10.375ZM7.96967 15.1553C8.26256 15.4482 8.73744 15.4482 9.03033 15.1553C9.32322 14.8624 9.32322 14.3876 9.03033 14.0947L7.96967 15.1553ZM7.28033 12.3447C6.98744 12.0518 6.51256 12.0518 6.21967 12.3447C5.92678 12.6376 5.92678 13.1124 6.21967 13.4053L7.28033 12.3447ZM7.28033 13.4053C7.57322 13.1124 7.57322 12.6376 7.28033 12.3447C6.98744 12.0518 6.51256 12.0518 6.21967 12.3447L7.28033 13.4053ZM4.46967 14.0947C4.17678 14.3876 4.17678 14.8624 4.46967 15.1553C4.76256 15.4482 5.23744 15.4482 5.53033 15.1553L4.46967 14.0947ZM7.5 12.875C7.5 12.4608 7.16421 12.125 6.75 12.125C6.33579 12.125 6 12.4608 6 12.875H7.5ZM12 19.75C12.4142 19.75 12.75 19.4142 12.75 19C12.75 18.5858 12.4142 18.25 12 18.25V19.75ZM12 18.25C11.5858 18.25 11.25 18.5858 11.25 19C11.25 19.4142 11.5858 19.75 12 19.75V18.25ZM18 12.875C18 12.4608 17.6642 12.125 17.25 12.125C16.8358 12.125 16.5 12.4608 16.5 12.875H18ZM11.25 19C11.25 19.4142 11.5858 19.75 12 19.75C12.4142 19.75 12.75 19.4142 12.75 19H11.25ZM12.75 11.125C12.75 10.7108 12.4142 10.375 12 10.375C11.5858 10.375 11.25 10.7108 11.25 11.125H12.75ZM14.9697 14.0947C14.6768 14.3876 14.6768 14.8624 14.9697 15.1553C15.2626 15.4482 15.7374 15.4482 16.0303 15.1553L14.9697 14.0947ZM17.7803 13.4053C18.0732 13.1124 18.0732 12.6376 17.7803 12.3447C17.4874 12.0518 17.0126 12.0518 16.7197 12.3447L17.7803 13.4053ZM17.7803 12.3447C17.4874 12.0518 17.0126 12.0518 16.7197 12.3447C16.4268 12.6376 16.4268 13.1124 16.7197 13.4053L17.7803 12.3447ZM18.4697 15.1553C18.7626 15.4482 19.2374 15.4482 19.5303 15.1553C19.8232 14.8624 19.8232 14.3876 19.5303 14.0947L18.4697 15.1553ZM11.25 8.5V11.125H12.75V8.5H11.25ZM9.375 11.875H12V10.375H9.375V11.875ZM14.625 10.375H12V11.875H14.625V10.375ZM9.03033 14.0947L7.28033 12.3447L6.21967 13.4053L7.96967 15.1553L9.03033 14.0947ZM6.21967 12.3447L4.46967 14.0947L5.53033 15.1553L7.28033 13.4053L6.21967 12.3447ZM6 12.875V13.75H7.5V12.875H6ZM6 13.75C6 17.0637 8.68629 19.75 12 19.75V18.25C9.51472 18.25 7.5 16.2353 7.5 13.75H6ZM12 19.75C15.3137 19.75 18 17.0637 18 13.75H16.5C16.5 16.2353 14.4853 18.25 12 18.25V19.75ZM18 13.75V12.875H16.5V13.75H18ZM12.75 19V11.125H11.25V19H12.75ZM16.0303 15.1553L17.7803 13.4053L16.7197 12.3447L14.9697 14.0947L16.0303 15.1553ZM16.7197 13.4053L18.4697 15.1553L19.5303 14.0947L17.7803 12.3447L16.7197 13.4053Z",fill:"#000000"})," "]})]})}),e.jsx("span",{className:"px-3",style:{paddingLeft:"0px"},children:"Anchor"})]}),e.jsxs("div",{style:{display:"flex"},className:"hover:bg-gray-200 elemeSet rounded cursor-pointer p-2",onClick:()=>C(void 0),children:[e.jsx("div",{style:{width:"18px"},className:"fa fa-calendar-alt fa-1x ",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[e.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),e.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsxs("g",{id:"SVGRepo_iconCarrier",children:[e.jsx("path",{d:"M3 9H21M7 3V5M17 3V5M6 12H8M11 12H13M16 12H18M6 15H8M11 15H13M16 15H18M6 18H8M11 18H13M16 18H18M6.2 21H17.8C18.9201 21 19.4802 21 19.908 20.782C20.2843 20.5903 20.5903 20.2843 20.782 19.908C21 19.4802 21 18.9201 21 17.8V8.2C21 7.07989 21 6.51984 20.782 6.09202C20.5903 5.71569 20.2843 5.40973 19.908 5.21799C19.4802 5 18.9201 5 17.8 5H6.2C5.0799 5 4.51984 5 4.09202 5.21799C3.71569 5.40973 3.40973 5.71569 3.21799 6.09202C3 6.51984 3 7.07989 3 8.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round"})," "]})]})}),e.jsx("span",{className:"px-3",style:{paddingLeft:"7px"},children:"Date/time"})]}),e.jsxs("div",{children:[e.jsx("div",{className:" text-center w-full py-1 bg-gray-100 font-bold",children:"Table"}),e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer",onClick:()=>A(),style:{display:"flex"},children:[e.jsx("div",{style:{width:"12px"},className:"fa fa-1x fa-trash-can px-2",children:e.jsxs("svg",{version:"1.1",id:"_x32_",viewBox:"0 0 512 512",fill:"#000000",children:[e.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),e.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",e.jsx("g",{})," "]})]})}),e.jsx("span",{className:"px-3",style:{paddingLeft:"7px"},children:"Delete All Permanetlytable"})]}),e.jsxs("div",{className:"hover:bg-gray-200 elemeSet rounded cursor-pointer",onClick:()=>A(!0),style:{display:"flex"},children:[e.jsx("div",{style:{width:"12px"},className:"fa fa-1x fa-eye-slash px-2",children:e.jsxs("svg",{width:"30",height:"30",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{id:"Icons",x:"-960",y:"-256",width:"1280",height:"800",style:{fill:"none"}}),e.jsxs("g",{id:"Icons1",children:[e.jsx("g",{id:"Strike"}),e.jsx("g",{id:"H1"}),e.jsx("g",{id:"H2"}),e.jsx("g",{id:"H3"}),e.jsx("g",{id:"list-ul"}),e.jsx("g",{id:"hamburger-1"}),e.jsx("g",{id:"hamburger-2"}),e.jsx("g",{id:"list-ol"}),e.jsx("g",{id:"list-task"}),e.jsx("g",{id:"trash"}),e.jsx("g",{id:"vertical-menu"}),e.jsx("g",{id:"horizontal-menu"}),e.jsx("g",{id:"sidebar-2"}),e.jsx("g",{id:"Pen"})," ",e.jsx("g",{id:"Pen1"})," ",e.jsx("g",{id:"clock"}),e.jsx("g",{id:"external-link"}),e.jsx("g",{id:"hr"}),e.jsx("g",{id:"info"}),e.jsx("g",{id:"warning"}),e.jsx("g",{id:"plus-circle"}),e.jsx("g",{id:"minus-circle"}),e.jsx("g",{id:"vue"}),e.jsx("g",{id:"cog"}),e.jsx("g",{id:"logo"}),e.jsx("g",{id:"radio-check"}),e.jsx("g",{id:"eye-slash"})]})]})}),e.jsx("span",{className:"px-3",children:"Hide/Show All"})]}),e.jsxs("div",{className:"table-picker-wrapper",children:[e.jsxs("div",{className:"table-picker-trigger",style:{display:"flex"},children:[e.jsx("div",{style:{width:"37px"},className:"fa fa-1x fa-table px-2",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[e.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),e.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("g",{id:"SVGRepo_iconCarrier",children:e.jsx("path",{d:"M3 9H21M3 15H21M9 9L9 20M15 9L15 20M6.2 20H17.8C18.9201 20 19.4802 20 19.908 19.782C20.2843 19.5903 20.5903 19.2843 20.782 18.908C21 18.4802 21 17.9201 21 16.8V7.2C21 6.0799 21 5.51984 20.782 5.09202C20.5903 4.71569 20.2843 4.40973 19.908 4.21799C19.4802 4 18.9201 4 17.8 4H6.2C5.0799 4 4.51984 4 4.09202 4.21799C3.71569 4.40973 3.40973 4.71569 3.21799 5.09202C3 5.51984 3 6.07989 3 7.2V16.8C3 17.9201 3 18.4802 3.21799 18.908C3.40973 19.2843 3.71569 19.5903 4.09202 19.782C4.51984 20 5.07989 20 6.2 20Z",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),e.jsx("div",{children:e.jsx("strong",{className:"px-3",style:{paddingLeft:"7px"},children:"Create"})})]}),e.jsxs("div",{id:"table-picker-container",ref:a,className:"table-picker-container ",children:[e.jsx("div",{id:"table-picker-grid",ref:c,className:"table-picker-grid"}),e.jsx("span",{id:"table-dimensions",ref:f,className:"table-dimensions",children:"0 x 0"})]})]})]})]})})]})}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx("button",{style:{flex:1,margin:"0 4px",width:"auto"},onClick:()=>y("textAlign","start"),children:e.jsx("span",{children:e.jsx("svg",{width:"24",height:"24",focusable:"false",children:e.jsx("path",{d:"M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z",fillRule:"evenodd"})})})}),e.jsx("button",{style:{flex:1,margin:"0 4px",width:"auto"},onClick:()=>y("textAlign","center"),children:e.jsx("span",{children:e.jsx("svg",{width:"24",height:"24",focusable:"false",children:e.jsx("path",{d:"M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z",fillRule:"evenodd"})})})}),e.jsx("button",{style:{flex:1,margin:"0 4px",width:"auto"},onClick:()=>y("textAlign","end"),children:e.jsx("span",{className:"",children:e.jsx("svg",{width:"24",height:"24",focusable:"false",children:e.jsx("path",{d:"M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z",fillRule:"evenodd"})})})}),e.jsx("button",{style:{flex:1,margin:"0 4px",width:"auto"},onClick:()=>y("textAlign","start"),children:e.jsx("span",{className:"",children:e.jsx("svg",{width:"24",height:"24",focusable:"false",children:e.jsx("path",{d:"M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z",fillRule:"evenodd"})})})})]}),e.jsxs("div",{className:"relative inline-block text-left group z-10 border-0 w-ful l ",children:[e.jsx("div",{className:"w-full flex rounded-md",children:e.jsx("button",{type:"button",className:"inline-flex justify-start border-none w-full rounded-md border shadow-sm text-sm font -medium",id:"menu-button","aria-expanded":!0,"aria-haspopup":!0,children:e.jsxs("div",{className:"tox-split-button flex items-center",style:{userSelect:"none"},children:[e.jsx("span",{children:e.jsx("span",{c:!0,children:e.jsx("svg",{width:"24",height:"24",focusable:"false",children:e.jsx("path",{d:"M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2ZM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Z",fillRule:"evenodd"})})})}),e.jsx("span",{role:"presentation",className:"tox-tbtn tox-split-button__chevron","aria-disabled":"false",children:e.jsx("svg",{width:"10",height:"10",focusable:"false",children:e.jsx("path",{d:"M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8Z",fillRule:"nonzero"})})})," "]})})}),e.jsx("div",{className:"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",children:e.jsxs("div",{className:"flex",role:"none",children:[e.jsx("div",{onClick:()=>N(3,"disc"),children:e.jsx("div",{children:e.jsx("svg",{width:"48",height:"48",focusable:"false",children:e.jsxs("g",{fillRule:"evenodd",children:[e.jsx("circle",{cx:"11",cy:"14",r:"3"}),e.jsx("circle",{cx:"11",cy:"24",r:"3"}),e.jsx("circle",{cx:"11",cy:"34",r:"3"}),e.jsx("path",{opacity:".2",d:"M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"})]})})})}),e.jsx("div",{onClick:()=>N(3,"circle"),children:e.jsx("div",{children:e.jsx("svg",{width:"48",height:"48",focusable:"false",children:e.jsxs("g",{fillRule:"evenodd",children:[e.jsx("path",{d:"M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z",fillRule:"nonzero"}),e.jsx("path",{opacity:".2",d:"M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"})]})})})}),e.jsx("div",{children:e.jsx("div",{className:"",onClick:()=>N(),children:e.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",focusable:"false",children:[e.jsx("rect",{width:"48",height:"48",fill:"none"}),e.jsx("text",{x:"12",y:"14",fontFamily:"Arial",fontSize:"14",fill:"black",children:"1"}),e.jsx("text",{x:"12",y:"24",fontFamily:"Arial",fontSize:"14",fill:"black",children:"2"}),e.jsx("text",{x:"12",y:"34",fontFamily:"Arial",fontSize:"14",fill:"black",children:"3"}),e.jsx("rect",{x:"24",y:"12",width:"20",height:"4",fill:"black",opacity:".2"}),e.jsx("rect",{x:"24",y:"22",width:"20",height:"4",fill:"black",opacity:".2"}),e.jsx("rect",{x:"24",y:"32",width:"20",height:"4",fill:"black",opacity:".2"})]})})}),e.jsx("div",{onClick:()=>N(3,"upper-latin"),children:e.jsx("div",{className:"text-sm",children:e.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",focusable:"false",children:[e.jsx("text",{x:"12",y:"14",fontFamily:"Arial",fontSize:"14",fill:"black",children:"A"}),e.jsx("text",{x:"12",y:"24",fontFamily:"Arial",fontSize:"14",fill:"black",children:"B"}),e.jsx("text",{x:"12",y:"34",fontFamily:"Arial",fontSize:"14",fill:"black",children:"C"}),e.jsx("rect",{x:"18",y:"12",width:"22",height:"4",fill:"black",opacity:".2"}),e.jsx("rect",{width:"48",height:"48",fill:"none"}),e.jsx("rect",{x:"18",y:"22",width:"22",height:"4",fill:"black",opacity:".2"}),e.jsx("rect",{x:"18",y:"32",width:"22",height:"4",fill:"black",opacity:".2"})]})})})]})})]})]}),e.jsxs("div",{className:"flex items-center gap-1 border-t-2 border-b-2 border-gray-300 bg-white w-full px-2 ",children:[o,e.jsx("div",{className:"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",onClick:()=>x(),children:e.jsx("bold",{style:{width:"12px",fontWeight:"900px"},className:"fa fa-1x fa-bold px-2",children:"B"})}),e.jsx("div",{onClick:()=>x("i","**italic text **"),className:"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 ",children:e.jsx("i",{style:{width:"12px",fontWeight:"900px"},className:"fa fa-1x fa-italic px-2",children:"I"})}),e.jsx("div",{onClick:()=>x("u","**underLine text **"),className:"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",children:e.jsx("bold",{style:{width:"12px",fontWeight:"900px"},className:"fa fa-1x fa-underline px-2",children:"U"})}),e.jsx("div",{onClick:()=>x("s","**underLine text**"),className:"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",children:e.jsx("i",{style:{width:"12px",fontWeight:"900px"},className:"fa fa-1x fa-strikethrough px-2",children:e.jsx("strike",{children:"S"})})}),e.jsx("div",{onClick:()=>x("sup","**supperScript**"),className:"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",children:e.jsx("i",{style:{width:"12px",fontWeight:"900px"},className:"fa fa-1x fa-superscript px-2",children:e.jsx("sup",{children:"sup"})})}),e.jsx("div",{onClick:()=>x("sub","**supperScript**"),className:"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",children:e.jsx("i",{style:{width:"12px",fontWeight:"900px"},className:"fa fa-1x fa-subscript px-2",children:e.jsx("sub",{children:"Sub"})})}),e.jsx("div",{onClick:()=>x("Code","**code**"),className:"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",children:e.jsx("bold",{style:{width:"12px",fontWeight:"900px"},className:" px-2",children:"</>"})}),e.jsxs("div",{style:{border:"0",paddingTop:"4px"},className:"hover:bg-gray-200 bg-gray-50 hover:text-gray-700 elemeSet items-center text-center justify-baseline rounded cursor-pointer text-md ",children:[e.jsx("i",{className:" display-color",style:{border:"0"},children:e.jsxs("svg",{fill:"#000000",style:{border:"0"},viewBox:"0 0 32 32",width:"23",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("g",{id:"SVGRepo_bgCarrier"}),e.jsx("g",{id:"SVGRepo_tracerCarrier"}),e.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",e.jsx("title",{children:"brush"})," ",e.jsx("path",{d:"M21.25 6.031l0.344 0.375s1.688 1.688 0.156 3.25c-1.313 1.281-2.781 1.344-4.531 2.469-2.094 1.281-3.219 3.125-2.969 4.219 0.469 2.031 2.875 3.688 0.781 5.813-0.156 0.125-0.469 0.5-0.594 0.625 0 0 0.094 0.656-0.625 0.656 0 0 0.156 0.688-0.625 0.688l-9.625-9.625c0-0.75 0.656-0.656 0.656-0.656 0-0.5 0.438-0.594 0.625-0.594 0 0 0.438-0.469 0.625-0.656 2.094-2.125 3.813 0.344 5.781 0.781 1.125 0.281 3-0.844 4.281-2.938 1.094-1.781 1.125-3.25 2.438-4.563 1.563-1.563 3.281 0.156 3.281 0.156zM18.563 6.938c-0.594 0.594-0.594 1.594 0 2.188s1.625 0.625 2.219 0.031 0.594-1.656 0-2.25-1.625-0.563-2.219 0.031zM0.094 19.313l-0.094-1.25 2.563-2.563 9.531 9.594-2.531 2.594-1.281-0.156-0.125-1.5-1.5-0.125-0.094-1.594-1.531-0.063-0.125-1.531-1.5-0.094-0.156-1.531-1.531-0.125-0.094-1.531z"})," "]})]})}),e.jsx("div",{className:"color-picker color-container",style:{position:"absolute",top:0,bottom:0,height:"fit-content",overflow:"auto"},children:e.jsx("div",{className:"color-grid",children:h.map(u=>e.jsx("div",{className:"color-box",style:{backgroundColor:"#"+u},onClick:T=>m("background","#"+u,"","div")},u))})})]}),s,e.jsx("div",{title:"new fresh line",style:{flex:1,margin:"0 4px",textAlign:"center",paddingTop:"8px"},onClick:()=>v(),children:e.jsx("span",{className:"",children:e.jsxs("svg",{width:"20px",height:"20px",viewBox:"0 0 18 18",fill:"#000000",children:[e.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),e.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("g",{id:"SVGRepo_iconCarrier",children:e.jsx("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"})})]})})})]})]})}),e.jsx("div",{ref:i,id:"pom-texedito-container",className:"",style:{width:"100%",overflow:"hidden auto",height:"30vh",border:"1px solid #9d969633",padding:"0px",borderRadius:"3px"},children:e.jsx("div",{className:"p-6 ",style:{height:"100%",textAlign:"justify"},children:e.jsx("div",{ref:n,"data-placeholder":"Your Editing.....",onMouseUp:L,onKeyUp:L,className:"editor mt-1 border-gray-300",onInput:F,contentEditable:"true",id:"editor",style:{height:"100%"}})})}),e.jsxs("div",{className:" hideonprint flex items-center",children:[e.jsxs("div",{className:"hover:bg-gray-200",onClick:()=>v(),children:[e.jsx("i",{style:{width:"12px"},className:"fa fa-"}),e.jsx("strong",{className:"px-2",children:"NEW LINE"})]}),e.jsxs("p",{children:["Cursor position: ",e.jsx("span",{id:"cursorPosition",children:"0"})]})," ",e.jsxs("p",{children:["Text at cursor: ",e.jsx("span",{id:"textAtCursor"})]})]})]})},te=console.error;return console.error=(...r)=>{/Warning:/.test(r[0])||te(...r)},ee});
//# sourceMappingURL=pom-text-editor-react.umd.js.map