@editora/plugins 1.0.6 → 1.0.8
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 +57 -4
- package/dist/_commonjsHelpers-BH3jXuIh.js +1 -0
- package/dist/_commonjsHelpers-ByX85dGu.mjs +33 -0
- package/dist/anchor.cjs.js +11 -11
- package/dist/anchor.esm.js +130 -107
- package/dist/anchoredPopover-BzqGPOAE.js +1 -0
- package/dist/anchoredPopover-Dts0IrgU.mjs +106 -0
- package/dist/background-color.cjs.js +3 -3
- package/dist/background-color.esm.js +116 -119
- package/dist/code.cjs.js +82 -102
- package/dist/code.esm.js +1172 -662
- package/dist/comments.cjs.js +10 -10
- package/dist/comments.esm.js +195 -177
- package/dist/document-manager.cjs.js +1 -1
- package/dist/document-manager.esm.js +1 -1
- package/dist/documentManager-CTqRftU8.mjs +8369 -0
- package/dist/documentManager-Jf0RbSks.js +17 -0
- package/dist/embed-iframe.cjs.js +2 -2
- package/dist/embed-iframe.esm.js +8 -5
- package/dist/emojis.cjs.js +64 -39
- package/dist/emojis.esm.js +133 -104
- package/dist/html2canvas.esm-B5qzocYs.js +5 -0
- package/dist/html2canvas.esm-BWVIUcAF.mjs +4802 -0
- package/dist/{index-Bskk414V.mjs → index-BFsKNTTj.mjs} +50 -50
- package/dist/index-CvJk4DKa.js +221 -0
- package/dist/index-D3CycEFU.mjs +16543 -0
- package/dist/index-tqLTHcO6.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-Cz1qItab.js → index.es-CE_A4QSm.js} +5 -5
- package/dist/{index.es-DEcRmSTY.mjs → index.es-DQ78mYYo.mjs} +4 -3
- package/dist/index.esm.js +87 -79
- package/dist/jspdf.es.min-BoS80556.js +77 -0
- package/dist/jspdf.es.min-DQCoX5yh.mjs +7889 -0
- package/dist/link.cjs.js +6 -6
- package/dist/link.esm.js +41 -39
- package/dist/math.cjs.js +21 -21
- package/dist/math.esm.js +151 -112
- package/dist/media-manager.cjs.js +15 -15
- package/dist/media-manager.esm.js +227 -206
- package/dist/merge-tag.cjs.js +44 -12
- package/dist/merge-tag.esm.js +368 -241
- package/dist/page-break.cjs.js +2 -2
- package/dist/page-break.esm.js +77 -69
- package/dist/special-characters.cjs.js +83 -45
- package/dist/special-characters.esm.js +149 -100
- package/dist/spell-check.cjs.js +9 -9
- package/dist/spell-check.esm.js +235 -216
- package/dist/template.cjs.js +14 -14
- package/dist/template.esm.js +157 -131
- package/dist/text-color.cjs.js +9 -9
- package/dist/text-color.esm.js +131 -115
- package/index.d.ts +51 -1
- package/package.json +6 -4
- package/dist/colorSelectionApply-C0iOfMWb.js +0 -1
- package/dist/colorSelectionApply-D8r_gV32.mjs +0 -63
- package/dist/documentManager-DRUc1-Cs.mjs +0 -37581
- package/dist/documentManager-_tQQfQi9.js +0 -317
- package/dist/index-D3pJyAsj.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./shared-config.cjs.js"),u=()=>({name:"document-manager",toolbar:[{label:"Import Word",command:"importWord",icon:'<svg width="24" height="24" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V15h-2V9h-4V5H5c0-1.1.9-2 2-2Z"></path><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M11.4 18.2a1 1 0 0 0 1.2 1.6l1.4-1V22a1 1 0 1 0 2 0v-3.1l1.4 1a1 1 0 0 0 1.2-1.7L15 15.8l-3.6 2.4Z"></path></svg>',type:"button"},{label:"Export Word",command:"exportWord",icon:'<svg width="24" height="24" focusable="false"><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2ZM15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"></path></svg>',type:"button"},{label:"Export PDF",command:"exportPdf",icon:'<svg width="24" height="24" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2Z"></path><path d="M2.6 15.2v-1.9h1c.6 0 1-.2 1.4-.5.3-.3.5-.7.5-1.2s-.2-.9-.5-1.2a2 2 0 0 0-1.3-.4H1v5.2h1.6Zm.4-3h-.4v-1.1h.5l.6.1.2.5c0 .1 0 .3-.2.4l-.7.1Zm5.7 3 1-.1c.3 0 .5-.2.7-.4l.5-.8c.2-.3.2-.7.2-1.3v-1l-.5-.8c-.2-.3-.4-.5-.7-.6L8.7 10H6.3v5.2h2.4Zm-.4-1.1H8v-3h.4c.5 0 .8.2 1 .4l.2 1.1-.1 1-.3.3-.8.2Zm5.3 1.2V13h2v-1h-2v-1H16V10h-4v5.2h1.6Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"></path></svg>',type:"button"}],commands:{importWord:()=>{const r=()=>{const o=window.getSelection();if(o&&o.rangeCount>0){let i=o.getRangeAt(0).startContainer;for(;i&&i!==document.body;){if(i.nodeType===Node.ELEMENT_NODE){const l=i;if(l.getAttribute("contenteditable")==="true")return l}i=i.parentNode}}const n=document.activeElement;if(n?.getAttribute("contenteditable")==="true")return n;const t=n?.closest('[contenteditable="true"]');return t||document.querySelector('[contenteditable="true"]')},e=document.createElement("input");return e.type="file",e.accept=".docx",e.onchange=async o=>{const n=o.target.files?.[0];if(n)try{const t=r();if(t){const{importFromWord:i}=await Promise.resolve().then(()=>require("./documentManager-Jf0RbSks.js")),l=await i(n);t.innerHTML=l,t.dispatchEvent(new Event("input",{bubbles:!0}))}}catch(t){console.error("Import failed:",t),alert("Failed to import Word document. Please check the console for details.")}},e.click(),!0},exportWord:async()=>{const r=()=>{const e=window.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0).startContainer;for(;t&&t!==document.body;){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("contenteditable")==="true")return t;t=t.parentNode}}const o=document.activeElement;return o?.getAttribute("contenteditable")==="true"?o:o?.closest('[contenteditable="true"]')||document.querySelector('[contenteditable="true"]')};try{const e=r();if(e){const o=e.innerHTML,{exportToWord:n}=await Promise.resolve().then(()=>require("./documentManager-Jf0RbSks.js"));await n(o,"document.docx")}return!0}catch(e){return console.error("Export failed:",e),alert("Failed to export to Word. Please check the console for details."),!1}},exportPdf:async()=>{const r=()=>{const e=window.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0).startContainer;for(;t&&t!==document.body;){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("contenteditable")==="true")return t;t=t.parentNode}}const o=document.activeElement;return o?.getAttribute("contenteditable")==="true"?o:o?.closest('[contenteditable="true"]')||document.querySelector('[contenteditable="true"]')};try{const e=r();if(e){const o=e.innerHTML,{exportToPdf:n}=await Promise.resolve().then(()=>require("./documentManager-Jf0RbSks.js"));await n(o,"document.pdf",e)}else console.error("PDF Export: No editor element found"),alert("No active editor found. Please click in the editor area first.");return!0}catch(e){return console.error("PDF Export: Export failed:",e),alert("Failed to export to PDF. Please check the console for details."),!1}}},keymap:{}}),s={apiEndpoints:{exportWord:"/documents/export-word"},headers:{},useClientSideFallback:!0};let c={...s};function p(r){c={...c,...r}}function d(){return{...c}}function h(r){const e=d(),o=a.getGlobalApiConfig(),n=e.apiUrl||o.apiUrl;return a.buildApiUrl(n,e.apiEndpoints[r])}function g(){const r=a.getGlobalApiHeaders(),o=d().headers||{};return{...r,...o}}exports.DocumentManagerPlugin=u;exports.getApiHeaders=g;exports.getApiUrl=h;exports.getDocumentManagerConfig=d;exports.setDocumentManagerConfig=p;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./heading.cjs.js"),r=require("./bold.cjs.js"),g=require("./italic.cjs.js"),u=require("./underline.cjs.js"),o=require("./strikethrough.cjs.js"),a=require("./list.cjs.js"),s=require("./checklist.cjs.js"),c=require("./history.cjs.js"),P=require("./link.cjs.js"),m=require("./blockquote.cjs.js"),d=require("./clear-formatting.cjs.js"),C=require("./code.cjs.js"),q=require("./table.cjs.js"),p=require("./font-size.cjs.js"),h=require("./font-family.cjs.js"),T=require("./text-alignment.cjs.js"),M=require("./text-color.cjs.js"),k=require("./background-color.cjs.js"),f=require("./line-height.cjs.js"),b=require("./indent.cjs.js"),A=require("./direction.cjs.js"),F=require("./capitalization.cjs.js"),S=require("./math.cjs.js"),y=require("./special-characters.cjs.js"),E=require("./emojis.cjs.js"),D=require("./embed-iframe.cjs.js"),B=require("./anchor.cjs.js"),n=require("./media-manager.cjs.js"),l=require("./index-tqLTHcO6.js"),H=require("./preview.cjs.js"),I=require("./fullscreen.cjs.js"),z=require("./print.cjs.js"),L=require("./page-break.cjs.js"),v=require("./footnote.cjs.js"),x=require("./code-sample.cjs.js"),G=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),j=require("./comments.cjs.js"),U=require("./spell-check.cjs.js"),_=require("./a11y-checker.cjs.js"),i=require("./shared-config.cjs.js");exports.HeadingPlugin=t.HeadingPlugin;exports.BoldPlugin=r.BoldPlugin;exports.ItalicPlugin=g.ItalicPlugin;exports.UnderlinePlugin=u.UnderlinePlugin;exports.StrikethroughPlugin=o.StrikethroughPlugin;exports.ListPlugin=a.ListPlugin;exports.ChecklistPlugin=s.ChecklistPlugin;exports.HistoryPlugin=c.HistoryPlugin;exports.LinkPlugin=P.LinkPlugin;exports.BlockquotePlugin=m.BlockquotePlugin;exports.ClearFormattingPlugin=d.ClearFormattingPlugin;exports.CodePlugin=C.CodePlugin;exports.TablePlugin=q.TablePlugin;exports.FontSizePlugin=p.FontSizePlugin;exports.FontFamilyPlugin=h.FontFamilyPlugin;exports.TextAlignmentPlugin=T.TextAlignmentPlugin;exports.TextColorPlugin=M.TextColorPlugin;exports.BackgroundColorPlugin=k.BackgroundColorPlugin;exports.LineHeightPlugin=f.LineHeightPlugin;exports.IndentPlugin=b.IndentPlugin;exports.DirectionPlugin=A.DirectionPlugin;exports.CapitalizationPlugin=F.CapitalizationPlugin;exports.MathPlugin=S.MathPlugin;exports.SpecialCharactersPlugin=y.SpecialCharactersPlugin;exports.EmojisPlugin=E.EmojisPlugin;exports.EmbedIframePlugin=D.EmbedIframePlugin;exports.AnchorPlugin=B.AnchorPlugin;exports.MediaManagerPlugin=n.MediaManagerPlugin;exports.getMediaManagerConfig=n.getMediaManagerConfig;exports.setMediaManagerConfig=n.setMediaManagerConfig;exports.DocumentManagerPlugin=l.DocumentManagerPlugin;exports.getDocumentManagerConfig=l.getDocumentManagerConfig;exports.setDocumentManagerConfig=l.setDocumentManagerConfig;exports.PreviewPlugin=H.PreviewPlugin;exports.FullscreenPlugin=I.FullscreenPlugin;exports.PrintPlugin=z.PrintPlugin;exports.PageBreakPlugin=L.PageBreakPlugin;exports.FootnotePlugin=v.FootnotePlugin;exports.CodeSamplePlugin=x.CodeSamplePlugin;exports.MergeTagPlugin=G.MergeTagPlugin;exports.PREDEFINED_TEMPLATES=e.PREDEFINED_TEMPLATES;exports.TemplatePlugin=e.TemplatePlugin;exports.addCustomTemplate=e.addCustomTemplate;exports.getAllTemplates=e.getAllTemplates;exports.getTemplateCategories=e.getTemplateCategories;exports.getTemplatesByCategory=e.getTemplatesByCategory;exports.sanitizeTemplate=e.sanitizeTemplate;exports.searchTemplates=e.searchTemplates;exports.validateTemplate=e.validateTemplate;exports.CommentsPlugin=j.CommentsPlugin;exports.SpellCheckPlugin=U.SpellCheckPlugin;exports.A11yCheckerPlugin=_.A11yCheckerPlugin;exports.buildApiUrl=i.buildApiUrl;exports.getGlobalApiConfig=i.getGlobalApiConfig;exports.getGlobalApiHeaders=i.getGlobalApiHeaders;exports.setGlobalApiConfig=i.setGlobalApiConfig;
|