@grapesjs/studio-sdk-plugins 1.0.29 → 1.0.30
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/dist/canvasScreenshot/index.cjs.d.ts +3 -0
- package/dist/canvasScreenshot/index.cjs.js +1 -0
- package/dist/canvasScreenshot/index.d.ts +3 -0
- package/dist/canvasScreenshot/index.es.d.ts +3 -0
- package/dist/canvasScreenshot/index.es.js +212 -0
- package/dist/canvasScreenshot/index.umd.js +1 -0
- package/dist/canvasScreenshot/shared.d.ts +3 -0
- package/dist/canvasScreenshot/types.d.ts +61 -0
- package/dist/canvasScreenshot/typesSchema.d.ts +17 -0
- package/dist/canvasScreenshot/utils.d.ts +3 -0
- package/dist/index.cjs.d.ts +1 -0
- package/dist/index.cjs.js +48 -48
- package/dist/index.d.ts +1 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +2400 -2302
- package/dist/index.umd.js +50 -50
- package/dist/layoutSidebarButtons/index.cjs.js +1 -1
- package/dist/layoutSidebarButtons/index.es.js +173 -171
- package/dist/layoutSidebarButtons/index.umd.js +1 -1
- package/dist/layoutSidebarButtons/types.d.ts +29 -6
- package/dist/layoutSidebarButtons/typesSchema.d.ts +16 -0
- package/dist/prosemirror/index.cjs.js +9 -9
- package/dist/prosemirror/index.es.js +894 -885
- package/dist/prosemirror/index.umd.js +8 -8
- package/dist/prosemirror/utils.d.ts +4 -1
- package/dist/rteTinyMce/index.cjs.js +2 -2
- package/dist/rteTinyMce/index.es.js +96 -96
- package/dist/rteTinyMce/index.umd.js +2 -2
- package/dist/swiperComponent/index.cjs.js +5 -5
- package/dist/swiperComponent/index.es.js +103 -101
- package/dist/swiperComponent/index.umd.js +5 -5
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComponentView } from 'grapesjs';
|
|
2
|
-
import { MarkType, NodeType } from 'prosemirror-model';
|
|
2
|
+
import { MarkType, NodeType, Node } from 'prosemirror-model';
|
|
3
3
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
export declare const mapElToView: WeakMap<HTMLElement, {
|
|
6
6
|
view: EditorView;
|
|
7
7
|
gjsView: ComponentView;
|
|
8
|
+
initialDoc: Node;
|
|
8
9
|
}>;
|
|
9
10
|
export declare const mapViewToEl: WeakMap<EditorView, {
|
|
10
11
|
el: HTMLElement;
|
|
@@ -15,11 +16,13 @@ export declare const deleteElToViewMapping: (el: HTMLElement, view: EditorView)
|
|
|
15
16
|
export declare const getViewFromEl: (el: HTMLElement) => {
|
|
16
17
|
view: EditorView;
|
|
17
18
|
gjsView: ComponentView;
|
|
19
|
+
initialDoc: Node;
|
|
18
20
|
} | undefined;
|
|
19
21
|
export declare const getElFromView: (view: EditorView) => {
|
|
20
22
|
el: HTMLElement;
|
|
21
23
|
gjsView: ComponentView;
|
|
22
24
|
} | undefined;
|
|
25
|
+
export declare const isDocChangedByEl: (el: HTMLElement) => boolean;
|
|
23
26
|
/**
|
|
24
27
|
* Get the GrapesJS component from the PM view
|
|
25
28
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var v=(t=>(t.free="free",t.startup="startup",t.business="business",t.enterprise="enterprise",t))(v||{}),m=(t=>(t.toastAdd="studio:toastAdd",t.toastRemove="studio:toastRemove",t.dialogOpen="studio:dialogOpen",t.dialogClose="studio:dialogClose",t.sidebarLeftSet="studio:sidebarLeft:set",t.sidebarLeftGet="studio:sidebarLeft:get",t.sidebarLeftToggle="studio:sidebarLeft:toggle",t.sidebarRightSet="studio:sidebarRight:set",t.sidebarRightGet="studio:sidebarRight:get",t.sidebarRightToggle="studio:sidebarRight:toggle",t.sidebarTopSet="studio:sidebarTop:set",t.sidebarTopGet="studio:sidebarTop:get",t.sidebarTopToggle="studio:sidebarTop:toggle",t.sidebarBottomSet="studio:sidebarBottom:set",t.sidebarBottomGet="studio:sidebarBottom:get",t.sidebarBottomToggle="studio:sidebarBottom:toggle",t.symbolAdd="studio:symbolAdd",t.symbolDetach="studio:symbolDetach",t.symbolOverride="studio:symbolOverride",t.symbolPropagateStyles="studio:propagateStyles",t.getPagesConfig="studio:getPagesConfig",t.setPagesConfig="studio:setPagesConfig",t.getPageSettings="studio:getPageSettings",t.setPageSettings="studio:setPageSettings",t.clearPage="studio:clearPage",t.projectFiles="studio:projectFiles",t.validateCode="studio:validateCode",t.canvasReload="studio:canvasReload",t.getBlocksPanel="studio:getBlocksPanel",t.setBlocksPanel="studio:setBlocksPanel",t.getStateContextMenu="studio:getStateContextMenu",t.setStateContextMenu="studio:setStateContextMenu",t.contextMenuComponent="studio:contextMenuComponent",t.layoutAdd="studio:layoutAdd",t.layoutRemove="studio:layoutRemove",t.layoutToggle="studio:layoutToggle",t.layoutUpdate="studio:layoutUpdate",t.layoutGet="studio:layoutGet",t.layoutConfigGet="studio:layoutConfigGet",t.layoutConfigSet="studio:layoutConfigSet",t.getStateTheme="studio:getStateTheme",t.setStateTheme="studio:setStateTheme",t.assetProviderGet="studio:assetProviderGet",t.assetProviderAdd="studio:assetProviderAdd",t.assetProviderRemove="studio:assetProviderRemove",t.fontGet="studio:fontGet",t.fontAdd="studio:fontAdd",t.fontRemove="studio:fontRemove",t.fontManagerOpen="studio:fontManagerOpen",t.menuFontLoad="studio:menuFontLoad",t.toggleStateDataSource="studio:toggleStateDataSource",t.getStateDataSource="studio:getStateDataSource",t.dataSourceSetGlobalData="studio:dataSourceSetGlobalData",t.dataSourceSetImporter="studio:dataSourceSetImporter",t.dataSourceSetExporter="studio:dataSourceSetExporter",t.setDragAbsolute="studio:setDragAbsolute",t))(m||{}),A=(t=>(t.dark="dark",t.light="light",t.auto="auto",t))(A||{});const L="app.grapesjs.com",O="app-stage.grapesjs.com",M="app2.grapesjs.com",G="app-stage2.grapesjs.com",R=[L,M,O,G,"localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],N="license:check:start",B="license:check:end",U=()=>typeof window<"u",j=({isDev:t,isStage:n})=>`${t?"":`https://${n?O:L}`}/api`,S=()=>{const t=U()&&window.location.hostname;return!!t&&(R.includes(t)||R.some(n=>t.endsWith(n)))};async function W({path:t,baseApiUrl:n,method:o="GET",headers:s={},params:i,body:l}){const c=`${n||j({isDev:!1,isStage:!1})}${t}`,r={method:o,headers:{"Content-Type":"application/json",...s}};l&&(r.body=JSON.stringify(l));const b=i?new URLSearchParams(i).toString():"",e=b?`?${b}`:"",a=await fetch(`${c}${e}`,r);if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return a.json()}const P={[v.free]:0,[v.startup]:10,[v.business]:20,[v.enterprise]:30};function F(t){const n=t;return n.init=o=>s=>t(s,o),n}const $=t=>F(t);async function C({editor:t,plan:n,pluginName:o,licenseKey:s,cleanup:i}){let l="",d=!1;const c=S(),r=e=>{console.warn("Cleanup plugin:",o,"Reason:",e),i()},b=(e={})=>{var f;const{error:a,sdkLicense:x}=e,u=(f=e.plan)==null?void 0:f.category;if(!(x||e.license)||a)r(a||"Invalid license");else if(u){const E=P[n],p=P[u];E>p&&r({pluginRequiredPlan:n,licensePlan:u})}};t.on(N,e=>{l=e==null?void 0:e.baseApiUrl,d=!0}),t.on(B,e=>{b(e)}),setTimeout(async()=>{if(!d){if(c)return;if(s){const e=await K({licenseKey:s,pluginName:o,baseApiUrl:l});e&&b(e)}else r("The `licenseKey` option not provided")}},2e3)}async function K(t){const{licenseKey:n,pluginName:o,baseApiUrl:s}=t;try{return(await W({baseApiUrl:s,path:`/sdk/${n||"na"}`,method:"POST",params:{d:window.location.hostname,pn:o}})).result||{}}catch(i){return console.error("Error during SDK license check:",i),!1}}const q=(t,n,o)=>{const{doc:s=document}=o,i=o.target||s.head,l=i.querySelector(`style[${t}]`)||s.createElement("style");l.setAttribute(t,"true"),l.innerHTML=n,!i.contains(l)&&i.appendChild(l)},H=t=>t.dispatchEvent(new CustomEvent("input"));function z(t,n){if(!n)return()=>{};const o=t.Components.events,s=e=>t.getSelectedAll().includes(e),i=e=>e.isInstanceOf("text")&&!e.isChildOf("text"),l=e=>e.isChildOf("text"),d=e=>t.getEditing()===e,c=(e,a={})=>{e.trigger("focus",a.event)},r=(e,a)=>{s(e)&&i(e)&&!d(e)&&c(e,a)},b=(e,a)=>{if(s(e)&&!i(e)&&l(e)){const x=e.parents().find(u=>u.isInstanceOf("text"));x&&(c(x,a),setTimeout(()=>t.select(x),0))}};return t.on(o.select,r),t.on(o.selectBefore,b),()=>{t.off(o.select,r),t.off(o.selectBefore,b)}}const V="rteTinyMce",J=v.startup,X=`
|
|
2
2
|
.tox .tox-toolbar,
|
|
3
3
|
.tox .tox-toolbar__overflow,
|
|
4
4
|
.tox .tox-toolbar__primary,
|
|
@@ -101,4 +101,4 @@
|
|
|
101
101
|
background-color: var(--gs-theme-cl-prm-bg1);
|
|
102
102
|
border-color: var(--gs-theme-cl-prm-bg3);
|
|
103
103
|
opacity: 0.75;
|
|
104
|
-
}`,T=new WeakMap,Y=(t,n)=>{T.set(t,n)},Q=t=>{T.delete(t)},w=t=>T.get(t),y=t=>{const n=t.target,o=n.closest(".tox"),
|
|
104
|
+
}`,T=new WeakMap,Y=(t,n)=>{T.set(t,n)},Q=t=>{T.delete(t)},w=t=>T.get(t),y=t=>{const n=t.target,o=n.closest(".tox"),s=n.matches(".ephox-snooker-resizer-bar");(o||s)&&t.stopPropagation()},_=t=>{t.stopPropagation(),t.preventDefault()},Z=(t,n)=>{const o=t.getDoc(),s=t.getWin();if(n!=null&&n.event){const{event:i}=n,{clientX:l,clientY:d}=i;let c;if(o.caretRangeFromPoint)c=o.caretRangeFromPoint(l,d);else if(o.caretPositionFromPoint){const r=o.caretPositionFromPoint(l,d);c=o.createRange(),c==null||c.setStart(r.offsetNode,r.offset)}if(c){const r=s.getSelection();r==null||r.removeAllRanges(),r==null||r.addRange(c),t.selection.setRng(c)}}else t.execCommand("SelectAll")},tt=t=>{var b,e;const{el:n,editor:o,componentView:s}=t,i=o.runCommand(m.getStateTheme),l=s.model,d={target:n,inline:!0,skin:(i==null?void 0:i.theme)===A.dark?"oxide-dark":"oxide",menubar:!1,image_advtab:!0,paste_data_images:!0,statusbar:!1,branding:!1,forced_root_block:"div",plugins:"advlist autolink lists link image media table",toolbar_mode:"sliding",toolbar:"bold italic underline strikethrough forecolor backcolor alignleft aligncenter alignright alignjustify link image | fontfamily fontsize bullist numlist outdent indent table"},c=((e=(b=t.pluginOpts)==null?void 0:b.loadConfig)==null?void 0:e.call(b,{config:d,editor:o,componentView:s,component:l}))||{};return{...d,...c}},D=(t,n=document)=>new Promise((o,s)=>{const i=Array.isArray(t)?[...t]:[t],{head:l}=n,d=c=>{if(c.length){const r=n.createElement("script");r.src=c.shift(),r.onload=d.bind(null,c),r.onerror=s,l.appendChild(r)}else o()};d(i)}),et=function(t,n={}){const o={cdnScript:"https://cdn.jsdelivr.net/npm/tinymce@6.8.5/tinymce.min.js",...n},{cdnScript:s}=o,i=t.Canvas.events,l=!o.skipCustomTheme,d="gs-plg-tinymce-studio-theme",c=async(e,a)=>{const x=e.ownerDocument,u=x.defaultView,g=a==null?void 0:a.view;if(!u||!g){console.warn("Missing required data",{win:u,componentView:g});return}const f=tt({el:e,editor:t,componentView:g,pluginOpts:o}),p=(await u.tinymce.init(f))[0];if(!p)return;const I=(await window.tinymce.init({...f,target:document.createElement("div")}))[0];return p.ui.show(),x.body.addEventListener("mousedown",y),document.body.addEventListener("mousedown",y),p.on("Change",()=>H(e)),p.on("blur",()=>p.ui.show()),p.on("OpenWindow",function(){var k;const h=(k=x.querySelector(".tox-dialog"))==null?void 0:k.closest(".tox");h&&(h==null?void 0:h.ownerDocument)!==document&&(document.body.appendChild(h),p.once("CloseWindow",()=>{h&&h.ownerDocument===document&&x.body.appendChild(h)}))}),e.addEventListener("dragstart",_,{capture:!0}),t.runCommand(m.setStateContextMenu,{enabled:!1}),Z(p,a),{rteEditor:p,rteEditorShallow:I}},r=(e,a)=>{e.ownerDocument.body.removeEventListener("mousedown",y),document.body.removeEventListener("mousedown",y),e.removeEventListener("dragstart",_,{capture:!0}),t.runCommand(m.setStateContextMenu,{enabled:!0}),a.rteEditor.destroy(),a.rteEditorShallow.destroy()};t.on(i.frameLoad,async({window:e})=>{const a=e.document;D(s,a)}),t.onReady(()=>{D(s,document),l&&q(d,X,{target:document.body})}),t.setCustomRte({parseContent:!0,async enable(e,a,x){const u=w(e);if(u)return u.rteEditor;const g=await c(e,x);return g&&Y(e,g),g==null?void 0:g.rteEditor},disable(e){const a=w(e);a&&(Q(e),r(e,a))},getContent(e,a,x){var f;const u=w(e),g=u==null?void 0:u.rteEditor;return g&&!g.isDirty()?x.view.lastContent:g?(f=g.getContent)==null?void 0:f.call(g):e.innerHTML}});const b=z(t,o.enableOnClick);C({editor:t,licenseKey:o.licenseKey,plan:J,pluginName:V,cleanup:()=>{t.RichTextEditor.customRte=void 0,b()}})},ot=$(et);module.exports=ot;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var v = /* @__PURE__ */ ((t) => (t.free = "free", t.startup = "startup", t.business = "business", t.enterprise = "enterprise", t))(v || {}), m = /* @__PURE__ */ ((t) => (t.toastAdd = "studio:toastAdd", t.toastRemove = "studio:toastRemove", t.dialogOpen = "studio:dialogOpen", t.dialogClose = "studio:dialogClose", t.sidebarLeftSet = "studio:sidebarLeft:set", t.sidebarLeftGet = "studio:sidebarLeft:get", t.sidebarLeftToggle = "studio:sidebarLeft:toggle", t.sidebarRightSet = "studio:sidebarRight:set", t.sidebarRightGet = "studio:sidebarRight:get", t.sidebarRightToggle = "studio:sidebarRight:toggle", t.sidebarTopSet = "studio:sidebarTop:set", t.sidebarTopGet = "studio:sidebarTop:get", t.sidebarTopToggle = "studio:sidebarTop:toggle", t.sidebarBottomSet = "studio:sidebarBottom:set", t.sidebarBottomGet = "studio:sidebarBottom:get", t.sidebarBottomToggle = "studio:sidebarBottom:toggle", t.symbolAdd = "studio:symbolAdd", t.symbolDetach = "studio:symbolDetach", t.symbolOverride = "studio:symbolOverride", t.symbolPropagateStyles = "studio:propagateStyles", t.getPagesConfig = "studio:getPagesConfig", t.setPagesConfig = "studio:setPagesConfig", t.getPageSettings = "studio:getPageSettings", t.setPageSettings = "studio:setPageSettings", t.clearPage = "studio:clearPage", t.projectFiles = "studio:projectFiles", t.validateCode = "studio:validateCode", t.canvasReload = "studio:canvasReload", t.getBlocksPanel = "studio:getBlocksPanel", t.setBlocksPanel = "studio:setBlocksPanel", t.getStateContextMenu = "studio:getStateContextMenu", t.setStateContextMenu = "studio:setStateContextMenu", t.contextMenuComponent = "studio:contextMenuComponent", t.layoutAdd = "studio:layoutAdd", t.layoutRemove = "studio:layoutRemove", t.layoutToggle = "studio:layoutToggle", t.layoutUpdate = "studio:layoutUpdate", t.layoutGet = "studio:layoutGet", t.layoutConfigGet = "studio:layoutConfigGet", t.layoutConfigSet = "studio:layoutConfigSet", t.getStateTheme = "studio:getStateTheme", t.setStateTheme = "studio:setStateTheme", t.assetProviderGet = "studio:assetProviderGet", t.assetProviderAdd = "studio:assetProviderAdd", t.assetProviderRemove = "studio:assetProviderRemove", t.fontGet = "studio:fontGet", t.fontAdd = "studio:fontAdd", t.fontRemove = "studio:fontRemove", t.fontManagerOpen = "studio:fontManagerOpen", t.menuFontLoad = "studio:menuFontLoad", t.toggleStateDataSource = "studio:toggleStateDataSource", t.getStateDataSource = "studio:getStateDataSource", t.dataSourceSetGlobalData = "studio:dataSourceSetGlobalData", t.dataSourceSetImporter = "studio:dataSourceSetImporter", t.dataSourceSetExporter = "studio:dataSourceSetExporter", t.setDragAbsolute = "studio:setDragAbsolute", t))(m || {}), A = /* @__PURE__ */ ((t) => (t.dark = "dark", t.light = "light", t.auto = "auto", t))(A || {});
|
|
2
2
|
const L = "app.grapesjs.com", O = "app-stage.grapesjs.com", M = "app2.grapesjs.com", G = "app-stage2.grapesjs.com", R = [
|
|
3
3
|
L,
|
|
4
4
|
M,
|
|
@@ -20,74 +20,74 @@ async function W({
|
|
|
20
20
|
path: t,
|
|
21
21
|
baseApiUrl: n,
|
|
22
22
|
method: o = "GET",
|
|
23
|
-
headers:
|
|
23
|
+
headers: s = {},
|
|
24
24
|
params: i,
|
|
25
25
|
body: l
|
|
26
26
|
}) {
|
|
27
|
-
const c = `${n || j({ isDev: !1, isStage: !1 })}${t}`,
|
|
27
|
+
const c = `${n || j({ isDev: !1, isStage: !1 })}${t}`, r = {
|
|
28
28
|
method: o,
|
|
29
29
|
headers: {
|
|
30
30
|
"Content-Type": "application/json",
|
|
31
|
-
...
|
|
31
|
+
...s
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
l && (
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
37
|
-
throw new Error(`HTTP error! status: ${
|
|
38
|
-
return
|
|
34
|
+
l && (r.body = JSON.stringify(l));
|
|
35
|
+
const b = i ? new URLSearchParams(i).toString() : "", e = b ? `?${b}` : "", a = await fetch(`${c}${e}`, r);
|
|
36
|
+
if (!a.ok)
|
|
37
|
+
throw new Error(`HTTP error! status: ${a.status}`);
|
|
38
|
+
return a.json();
|
|
39
39
|
}
|
|
40
40
|
const P = {
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
41
|
+
[v.free]: 0,
|
|
42
|
+
[v.startup]: 10,
|
|
43
|
+
[v.business]: 20,
|
|
44
|
+
[v.enterprise]: 30
|
|
45
45
|
};
|
|
46
46
|
function F(t) {
|
|
47
47
|
const n = t;
|
|
48
|
-
return n.init = (o) => (
|
|
48
|
+
return n.init = (o) => (s) => t(s, o), n;
|
|
49
49
|
}
|
|
50
50
|
const $ = (t) => /* @__PURE__ */ F(t);
|
|
51
51
|
async function C({
|
|
52
52
|
editor: t,
|
|
53
53
|
plan: n,
|
|
54
54
|
pluginName: o,
|
|
55
|
-
licenseKey:
|
|
55
|
+
licenseKey: s,
|
|
56
56
|
cleanup: i
|
|
57
57
|
}) {
|
|
58
|
-
let l = "",
|
|
59
|
-
const c = S(),
|
|
58
|
+
let l = "", d = !1;
|
|
59
|
+
const c = S(), r = (e) => {
|
|
60
60
|
console.warn("Cleanup plugin:", o, "Reason:", e), i();
|
|
61
|
-
},
|
|
62
|
-
var
|
|
63
|
-
const { error:
|
|
64
|
-
if (!(
|
|
65
|
-
a
|
|
66
|
-
else if (
|
|
67
|
-
const E = P[n],
|
|
68
|
-
E >
|
|
61
|
+
}, b = (e = {}) => {
|
|
62
|
+
var f;
|
|
63
|
+
const { error: a, sdkLicense: x } = e, u = (f = e.plan) == null ? void 0 : f.category;
|
|
64
|
+
if (!(x || e.license) || a)
|
|
65
|
+
r(a || "Invalid license");
|
|
66
|
+
else if (u) {
|
|
67
|
+
const E = P[n], p = P[u];
|
|
68
|
+
E > p && r({ pluginRequiredPlan: n, licensePlan: u });
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
t.on(N, (e) => {
|
|
72
|
-
l = e == null ? void 0 : e.baseApiUrl,
|
|
72
|
+
l = e == null ? void 0 : e.baseApiUrl, d = !0;
|
|
73
73
|
}), t.on(B, (e) => {
|
|
74
|
-
|
|
74
|
+
b(e);
|
|
75
75
|
}), setTimeout(async () => {
|
|
76
|
-
if (!
|
|
76
|
+
if (!d) {
|
|
77
77
|
if (c) return;
|
|
78
|
-
if (
|
|
79
|
-
const e = await K({ licenseKey:
|
|
80
|
-
e &&
|
|
78
|
+
if (s) {
|
|
79
|
+
const e = await K({ licenseKey: s, pluginName: o, baseApiUrl: l });
|
|
80
|
+
e && b(e);
|
|
81
81
|
} else
|
|
82
|
-
|
|
82
|
+
r("The `licenseKey` option not provided");
|
|
83
83
|
}
|
|
84
84
|
}, 2e3);
|
|
85
85
|
}
|
|
86
86
|
async function K(t) {
|
|
87
|
-
const { licenseKey: n, pluginName: o, baseApiUrl:
|
|
87
|
+
const { licenseKey: n, pluginName: o, baseApiUrl: s } = t;
|
|
88
88
|
try {
|
|
89
89
|
return (await W({
|
|
90
|
-
baseApiUrl:
|
|
90
|
+
baseApiUrl: s,
|
|
91
91
|
path: `/sdk/${n || "na"}`,
|
|
92
92
|
method: "POST",
|
|
93
93
|
params: {
|
|
@@ -100,27 +100,27 @@ async function K(t) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
const q = (t, n, o) => {
|
|
103
|
-
const { doc:
|
|
103
|
+
const { doc: s = document } = o, i = o.target || s.head, l = i.querySelector(`style[${t}]`) || s.createElement("style");
|
|
104
104
|
l.setAttribute(t, "true"), l.innerHTML = n, !i.contains(l) && i.appendChild(l);
|
|
105
105
|
}, H = (t) => t.dispatchEvent(new CustomEvent("input"));
|
|
106
106
|
function z(t, n) {
|
|
107
107
|
if (!n) return () => {
|
|
108
108
|
};
|
|
109
|
-
const o = t.Components.events,
|
|
110
|
-
e.trigger("focus",
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
|
|
109
|
+
const o = t.Components.events, s = (e) => t.getSelectedAll().includes(e), i = (e) => e.isInstanceOf("text") && !e.isChildOf("text"), l = (e) => e.isChildOf("text"), d = (e) => t.getEditing() === e, c = (e, a = {}) => {
|
|
110
|
+
e.trigger("focus", a.event);
|
|
111
|
+
}, r = (e, a) => {
|
|
112
|
+
s(e) && i(e) && !d(e) && c(e, a);
|
|
113
|
+
}, b = (e, a) => {
|
|
114
|
+
if (s(e) && !i(e) && l(e)) {
|
|
115
|
+
const x = e.parents().find((u) => u.isInstanceOf("text"));
|
|
116
|
+
x && (c(x, a), setTimeout(() => t.select(x), 0));
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
return t.on(o.select,
|
|
120
|
-
t.off(o.select,
|
|
119
|
+
return t.on(o.select, r), t.on(o.selectBefore, b), () => {
|
|
120
|
+
t.off(o.select, r), t.off(o.selectBefore, b);
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
const V = "rteTinyMce", J =
|
|
123
|
+
const V = "rteTinyMce", J = v.startup, X = `
|
|
124
124
|
.tox .tox-toolbar,
|
|
125
125
|
.tox .tox-toolbar__overflow,
|
|
126
126
|
.tox .tox-toolbar__primary,
|
|
@@ -228,30 +228,30 @@ const V = "rteTinyMce", J = h.startup, X = `
|
|
|
228
228
|
}, Q = (t) => {
|
|
229
229
|
T.delete(t);
|
|
230
230
|
}, w = (t) => T.get(t), y = (t) => {
|
|
231
|
-
const n = t.target, o = n.closest(".tox"),
|
|
232
|
-
(o ||
|
|
231
|
+
const n = t.target, o = n.closest(".tox"), s = n.matches(".ephox-snooker-resizer-bar");
|
|
232
|
+
(o || s) && t.stopPropagation();
|
|
233
233
|
}, _ = (t) => {
|
|
234
234
|
t.stopPropagation(), t.preventDefault();
|
|
235
235
|
}, Z = (t, n) => {
|
|
236
|
-
const o = t.getDoc(),
|
|
236
|
+
const o = t.getDoc(), s = t.getWin();
|
|
237
237
|
if (n != null && n.event) {
|
|
238
|
-
const { event: i } = n, { clientX: l, clientY:
|
|
238
|
+
const { event: i } = n, { clientX: l, clientY: d } = i;
|
|
239
239
|
let c;
|
|
240
240
|
if (o.caretRangeFromPoint)
|
|
241
|
-
c = o.caretRangeFromPoint(l,
|
|
241
|
+
c = o.caretRangeFromPoint(l, d);
|
|
242
242
|
else if (o.caretPositionFromPoint) {
|
|
243
|
-
const
|
|
244
|
-
c = o.createRange(), c == null || c.setStart(
|
|
243
|
+
const r = o.caretPositionFromPoint(l, d);
|
|
244
|
+
c = o.createRange(), c == null || c.setStart(r.offsetNode, r.offset);
|
|
245
245
|
}
|
|
246
246
|
if (c) {
|
|
247
|
-
const
|
|
248
|
-
|
|
247
|
+
const r = s.getSelection();
|
|
248
|
+
r == null || r.removeAllRanges(), r == null || r.addRange(c), t.selection.setRng(c);
|
|
249
249
|
}
|
|
250
250
|
} else
|
|
251
251
|
t.execCommand("SelectAll");
|
|
252
252
|
}, tt = (t) => {
|
|
253
|
-
var
|
|
254
|
-
const { el: n, editor: o, componentView:
|
|
253
|
+
var b, e;
|
|
254
|
+
const { el: n, editor: o, componentView: s } = t, i = o.runCommand(m.getStateTheme), l = s.model, d = {
|
|
255
255
|
target: n,
|
|
256
256
|
inline: !0,
|
|
257
257
|
skin: (i == null ? void 0 : i.theme) === A.dark ? "oxide-dark" : "oxide",
|
|
@@ -268,83 +268,83 @@ const V = "rteTinyMce", J = h.startup, X = `
|
|
|
268
268
|
plugins: "advlist autolink lists link image media table",
|
|
269
269
|
toolbar_mode: "sliding",
|
|
270
270
|
toolbar: "bold italic underline strikethrough forecolor backcolor alignleft aligncenter alignright alignjustify link image | fontfamily fontsize bullist numlist outdent indent table"
|
|
271
|
-
}, c = ((e = (
|
|
271
|
+
}, c = ((e = (b = t.pluginOpts) == null ? void 0 : b.loadConfig) == null ? void 0 : e.call(b, { config: d, editor: o, componentView: s, component: l })) || {};
|
|
272
272
|
return {
|
|
273
|
-
...
|
|
273
|
+
...d,
|
|
274
274
|
...c
|
|
275
275
|
};
|
|
276
|
-
}, D = (t, n = document) => new Promise((o,
|
|
277
|
-
const i = Array.isArray(t) ? [...t] : [t], { head: l } = n,
|
|
276
|
+
}, D = (t, n = document) => new Promise((o, s) => {
|
|
277
|
+
const i = Array.isArray(t) ? [...t] : [t], { head: l } = n, d = (c) => {
|
|
278
278
|
if (c.length) {
|
|
279
|
-
const
|
|
280
|
-
|
|
279
|
+
const r = n.createElement("script");
|
|
280
|
+
r.src = c.shift(), r.onload = d.bind(null, c), r.onerror = s, l.appendChild(r);
|
|
281
281
|
} else
|
|
282
282
|
o();
|
|
283
283
|
};
|
|
284
|
-
|
|
284
|
+
d(i);
|
|
285
285
|
}), et = function(t, n = {}) {
|
|
286
286
|
const o = {
|
|
287
287
|
cdnScript: "https://cdn.jsdelivr.net/npm/tinymce@6.8.5/tinymce.min.js",
|
|
288
288
|
...n
|
|
289
|
-
}, { cdnScript:
|
|
290
|
-
const
|
|
291
|
-
if (!
|
|
292
|
-
console.warn("Missing required data", { win:
|
|
289
|
+
}, { cdnScript: s } = o, i = t.Canvas.events, l = !o.skipCustomTheme, d = "gs-plg-tinymce-studio-theme", c = async (e, a) => {
|
|
290
|
+
const x = e.ownerDocument, u = x.defaultView, g = a == null ? void 0 : a.view;
|
|
291
|
+
if (!u || !g) {
|
|
292
|
+
console.warn("Missing required data", { win: u, componentView: g });
|
|
293
293
|
return;
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const f = tt({
|
|
296
296
|
el: e,
|
|
297
297
|
editor: t,
|
|
298
|
-
componentView:
|
|
298
|
+
componentView: g,
|
|
299
299
|
pluginOpts: o
|
|
300
|
-
}),
|
|
301
|
-
if (!
|
|
300
|
+
}), p = (await u.tinymce.init(f))[0];
|
|
301
|
+
if (!p) return;
|
|
302
302
|
const I = (await window.tinymce.init({
|
|
303
|
-
...
|
|
303
|
+
...f,
|
|
304
304
|
target: document.createElement("div")
|
|
305
305
|
}))[0];
|
|
306
|
-
return
|
|
306
|
+
return p.ui.show(), x.body.addEventListener("mousedown", y), document.body.addEventListener("mousedown", y), p.on("Change", () => H(e)), p.on("blur", () => p.ui.show()), p.on("OpenWindow", function() {
|
|
307
307
|
var k;
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
const h = (k = x.querySelector(".tox-dialog")) == null ? void 0 : k.closest(".tox");
|
|
309
|
+
h && (h == null ? void 0 : h.ownerDocument) !== document && (document.body.appendChild(h), p.once("CloseWindow", () => {
|
|
310
|
+
h && h.ownerDocument === document && x.body.appendChild(h);
|
|
311
311
|
}));
|
|
312
|
-
}), e.addEventListener("dragstart", _, { capture: !0 }), t.runCommand(m.setStateContextMenu, { enabled: !1 }), Z(
|
|
313
|
-
},
|
|
314
|
-
e.ownerDocument.body.removeEventListener("mousedown", y), document.body.removeEventListener("mousedown", y), e.removeEventListener("dragstart", _, { capture: !0 }), t.runCommand(m.setStateContextMenu, { enabled: !0 }),
|
|
312
|
+
}), e.addEventListener("dragstart", _, { capture: !0 }), t.runCommand(m.setStateContextMenu, { enabled: !1 }), Z(p, a), { rteEditor: p, rteEditorShallow: I };
|
|
313
|
+
}, r = (e, a) => {
|
|
314
|
+
e.ownerDocument.body.removeEventListener("mousedown", y), document.body.removeEventListener("mousedown", y), e.removeEventListener("dragstart", _, { capture: !0 }), t.runCommand(m.setStateContextMenu, { enabled: !0 }), a.rteEditor.destroy(), a.rteEditorShallow.destroy();
|
|
315
315
|
};
|
|
316
316
|
t.on(i.frameLoad, async ({ window: e }) => {
|
|
317
|
-
const
|
|
318
|
-
D(
|
|
317
|
+
const a = e.document;
|
|
318
|
+
D(s, a);
|
|
319
319
|
}), t.onReady(() => {
|
|
320
|
-
D(
|
|
320
|
+
D(s, document), l && q(d, X, { target: document.body });
|
|
321
321
|
}), t.setCustomRte({
|
|
322
322
|
parseContent: !0,
|
|
323
323
|
// @ts-expect-error - Type 'CustomRteOptions' is missing the following properties from type 'CustomRteOptions': editor, component, el
|
|
324
|
-
async enable(e,
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
327
|
-
const
|
|
328
|
-
return
|
|
324
|
+
async enable(e, a, x) {
|
|
325
|
+
const u = w(e);
|
|
326
|
+
if (u) return u.rteEditor;
|
|
327
|
+
const g = await c(e, x);
|
|
328
|
+
return g && Y(e, g), g == null ? void 0 : g.rteEditor;
|
|
329
329
|
},
|
|
330
330
|
disable(e) {
|
|
331
|
-
const
|
|
332
|
-
|
|
331
|
+
const a = w(e);
|
|
332
|
+
a && (Q(e), r(e, a));
|
|
333
333
|
},
|
|
334
|
-
getContent(e) {
|
|
335
|
-
var
|
|
336
|
-
const
|
|
337
|
-
return
|
|
334
|
+
getContent(e, a, x) {
|
|
335
|
+
var f;
|
|
336
|
+
const u = w(e), g = u == null ? void 0 : u.rteEditor;
|
|
337
|
+
return g && !g.isDirty() ? x.view.lastContent : g ? (f = g.getContent) == null ? void 0 : f.call(g) : e.innerHTML;
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
|
-
const
|
|
340
|
+
const b = z(t, o.enableOnClick);
|
|
341
341
|
C({
|
|
342
342
|
editor: t,
|
|
343
343
|
licenseKey: o.licenseKey,
|
|
344
344
|
plan: J,
|
|
345
345
|
pluginName: V,
|
|
346
346
|
cleanup: () => {
|
|
347
|
-
t.RichTextEditor.customRte = void 0,
|
|
347
|
+
t.RichTextEditor.customRte = void 0, b();
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
}, rt = $(et);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(p,h){typeof exports=="object"&&typeof module<"u"?module.exports=h():typeof define=="function"&&define.amd?define(h):(p=typeof globalThis<"u"?globalThis:p||self,p.StudioSdkPlugins_rteTinyMce=h())})(this,function(){"use strict";var p=(t=>(t.free="free",t.startup="startup",t.business="business",t.enterprise="enterprise",t))(p||{}),h=(t=>(t.toastAdd="studio:toastAdd",t.toastRemove="studio:toastRemove",t.dialogOpen="studio:dialogOpen",t.dialogClose="studio:dialogClose",t.sidebarLeftSet="studio:sidebarLeft:set",t.sidebarLeftGet="studio:sidebarLeft:get",t.sidebarLeftToggle="studio:sidebarLeft:toggle",t.sidebarRightSet="studio:sidebarRight:set",t.sidebarRightGet="studio:sidebarRight:get",t.sidebarRightToggle="studio:sidebarRight:toggle",t.sidebarTopSet="studio:sidebarTop:set",t.sidebarTopGet="studio:sidebarTop:get",t.sidebarTopToggle="studio:sidebarTop:toggle",t.sidebarBottomSet="studio:sidebarBottom:set",t.sidebarBottomGet="studio:sidebarBottom:get",t.sidebarBottomToggle="studio:sidebarBottom:toggle",t.symbolAdd="studio:symbolAdd",t.symbolDetach="studio:symbolDetach",t.symbolOverride="studio:symbolOverride",t.symbolPropagateStyles="studio:propagateStyles",t.getPagesConfig="studio:getPagesConfig",t.setPagesConfig="studio:setPagesConfig",t.getPageSettings="studio:getPageSettings",t.setPageSettings="studio:setPageSettings",t.clearPage="studio:clearPage",t.projectFiles="studio:projectFiles",t.validateCode="studio:validateCode",t.canvasReload="studio:canvasReload",t.getBlocksPanel="studio:getBlocksPanel",t.setBlocksPanel="studio:setBlocksPanel",t.getStateContextMenu="studio:getStateContextMenu",t.setStateContextMenu="studio:setStateContextMenu",t.contextMenuComponent="studio:contextMenuComponent",t.layoutAdd="studio:layoutAdd",t.layoutRemove="studio:layoutRemove",t.layoutToggle="studio:layoutToggle",t.layoutUpdate="studio:layoutUpdate",t.layoutGet="studio:layoutGet",t.layoutConfigGet="studio:layoutConfigGet",t.layoutConfigSet="studio:layoutConfigSet",t.getStateTheme="studio:getStateTheme",t.setStateTheme="studio:setStateTheme",t.assetProviderGet="studio:assetProviderGet",t.assetProviderAdd="studio:assetProviderAdd",t.assetProviderRemove="studio:assetProviderRemove",t.fontGet="studio:fontGet",t.fontAdd="studio:fontAdd",t.fontRemove="studio:fontRemove",t.fontManagerOpen="studio:fontManagerOpen",t.menuFontLoad="studio:menuFontLoad",t.toggleStateDataSource="studio:toggleStateDataSource",t.getStateDataSource="studio:getStateDataSource",t.dataSourceSetGlobalData="studio:dataSourceSetGlobalData",t.dataSourceSetImporter="studio:dataSourceSetImporter",t.dataSourceSetExporter="studio:dataSourceSetExporter",t.setDragAbsolute="studio:setDragAbsolute",t))(h||{}),E=(t=>(t.dark="dark",t.light="light",t.auto="auto",t))(E||{});const k="app.grapesjs.com",R="app-stage.grapesjs.com",P=[k,"app2.grapesjs.com",R,"app-stage2.grapesjs.com","localhost","127.0.0.1",".local-credentialless.webcontainer.io",".local.webcontainer.io","-sandpack.codesandbox.io"],I="license:check:start",M="license:check:end",G=()=>typeof window<"u",N=({isDev:t,isStage:n})=>`${t?"":`https://${n?R:k}`}/api`,B=()=>{const t=G()&&window.location.hostname;return!!t&&(P.includes(t)||P.some(n=>t.endsWith(n)))};async function S({path:t,baseApiUrl:n,method:o="GET",headers:s={},params:a,body:l}){const c=`${n||N({isDev:!1,isStage:!1})}${t}`,r={method:o,headers:{"Content-Type":"application/json",...s}};l&&(r.body=JSON.stringify(l));const b=a?new URLSearchParams(a).toString():"",e=b?`?${b}`:"",i=await fetch(`${c}${e}`,r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()}const _={[p.free]:0,[p.startup]:10,[p.business]:20,[p.enterprise]:30};function j(t){const n=t;return n.init=o=>s=>t(s,o),n}const U=t=>j(t);async function W({editor:t,plan:n,pluginName:o,licenseKey:s,cleanup:a}){let l="",d=!1;const c=B(),r=e=>{console.warn("Cleanup plugin:",o,"Reason:",e),a()},b=(e={})=>{var v;const{error:i,sdkLicense:x}=e,u=(v=e.plan)==null?void 0:v.category;if(!(x||e.license)||i)r(i||"Invalid license");else if(u){const L=_[n],f=_[u];L>f&&r({pluginRequiredPlan:n,licensePlan:u})}};t.on(I,e=>{l=e==null?void 0:e.baseApiUrl,d=!0}),t.on(M,e=>{b(e)}),setTimeout(async()=>{if(!d){if(c)return;if(s){const e=await F({licenseKey:s,pluginName:o,baseApiUrl:l});e&&b(e)}else r("The `licenseKey` option not provided")}},2e3)}async function F(t){const{licenseKey:n,pluginName:o,baseApiUrl:s}=t;try{return(await S({baseApiUrl:s,path:`/sdk/${n||"na"}`,method:"POST",params:{d:window.location.hostname,pn:o}})).result||{}}catch(a){return console.error("Error during SDK license check:",a),!1}}const $=(t,n,o)=>{const{doc:s=document}=o,a=o.target||s.head,l=a.querySelector(`style[${t}]`)||s.createElement("style");l.setAttribute(t,"true"),l.innerHTML=n,!a.contains(l)&&a.appendChild(l)},C=t=>t.dispatchEvent(new CustomEvent("input"));function K(t,n){if(!n)return()=>{};const o=t.Components.events,s=e=>t.getSelectedAll().includes(e),a=e=>e.isInstanceOf("text")&&!e.isChildOf("text"),l=e=>e.isChildOf("text"),d=e=>t.getEditing()===e,c=(e,i={})=>{e.trigger("focus",i.event)},r=(e,i)=>{s(e)&&a(e)&&!d(e)&&c(e,i)},b=(e,i)=>{if(s(e)&&!a(e)&&l(e)){const x=e.parents().find(u=>u.isInstanceOf("text"));x&&(c(x,i),setTimeout(()=>t.select(x),0))}};return t.on(o.select,r),t.on(o.selectBefore,b),()=>{t.off(o.select,r),t.off(o.selectBefore,b)}}const q="rteTinyMce",H=p.startup,z=`
|
|
2
2
|
.tox .tox-toolbar,
|
|
3
3
|
.tox .tox-toolbar__overflow,
|
|
4
4
|
.tox .tox-toolbar__primary,
|
|
@@ -101,4 +101,4 @@
|
|
|
101
101
|
background-color: var(--gs-theme-cl-prm-bg1);
|
|
102
102
|
border-color: var(--gs-theme-cl-prm-bg3);
|
|
103
103
|
opacity: 0.75;
|
|
104
|
-
}`,w=new WeakMap,V=(t,n)=>{w.set(t,n)},J=t=>{w.delete(t)},T=t=>w.get(t),m=t=>{const n=t.target,o=n.closest(".tox"),
|
|
104
|
+
}`,w=new WeakMap,V=(t,n)=>{w.set(t,n)},J=t=>{w.delete(t)},T=t=>w.get(t),m=t=>{const n=t.target,o=n.closest(".tox"),s=n.matches(".ephox-snooker-resizer-bar");(o||s)&&t.stopPropagation()},D=t=>{t.stopPropagation(),t.preventDefault()},X=(t,n)=>{const o=t.getDoc(),s=t.getWin();if(n!=null&&n.event){const{event:a}=n,{clientX:l,clientY:d}=a;let c;if(o.caretRangeFromPoint)c=o.caretRangeFromPoint(l,d);else if(o.caretPositionFromPoint){const r=o.caretPositionFromPoint(l,d);c=o.createRange(),c==null||c.setStart(r.offsetNode,r.offset)}if(c){const r=s.getSelection();r==null||r.removeAllRanges(),r==null||r.addRange(c),t.selection.setRng(c)}}else t.execCommand("SelectAll")},Y=t=>{var b,e;const{el:n,editor:o,componentView:s}=t,a=o.runCommand(h.getStateTheme),l=s.model,d={target:n,inline:!0,skin:(a==null?void 0:a.theme)===E.dark?"oxide-dark":"oxide",menubar:!1,image_advtab:!0,paste_data_images:!0,statusbar:!1,branding:!1,forced_root_block:"div",plugins:"advlist autolink lists link image media table",toolbar_mode:"sliding",toolbar:"bold italic underline strikethrough forecolor backcolor alignleft aligncenter alignright alignjustify link image | fontfamily fontsize bullist numlist outdent indent table"},c=((e=(b=t.pluginOpts)==null?void 0:b.loadConfig)==null?void 0:e.call(b,{config:d,editor:o,componentView:s,component:l}))||{};return{...d,...c}},A=(t,n=document)=>new Promise((o,s)=>{const a=Array.isArray(t)?[...t]:[t],{head:l}=n,d=c=>{if(c.length){const r=n.createElement("script");r.src=c.shift(),r.onload=d.bind(null,c),r.onerror=s,l.appendChild(r)}else o()};d(a)});return U(function(t,n={}){const o={cdnScript:"https://cdn.jsdelivr.net/npm/tinymce@6.8.5/tinymce.min.js",...n},{cdnScript:s}=o,a=t.Canvas.events,l=!o.skipCustomTheme,d="gs-plg-tinymce-studio-theme",c=async(e,i)=>{const x=e.ownerDocument,u=x.defaultView,g=i==null?void 0:i.view;if(!u||!g){console.warn("Missing required data",{win:u,componentView:g});return}const v=Y({el:e,editor:t,componentView:g,pluginOpts:o}),f=(await u.tinymce.init(v))[0];if(!f)return;const Q=(await window.tinymce.init({...v,target:document.createElement("div")}))[0];return f.ui.show(),x.body.addEventListener("mousedown",m),document.body.addEventListener("mousedown",m),f.on("Change",()=>C(e)),f.on("blur",()=>f.ui.show()),f.on("OpenWindow",function(){var O;const y=(O=x.querySelector(".tox-dialog"))==null?void 0:O.closest(".tox");y&&(y==null?void 0:y.ownerDocument)!==document&&(document.body.appendChild(y),f.once("CloseWindow",()=>{y&&y.ownerDocument===document&&x.body.appendChild(y)}))}),e.addEventListener("dragstart",D,{capture:!0}),t.runCommand(h.setStateContextMenu,{enabled:!1}),X(f,i),{rteEditor:f,rteEditorShallow:Q}},r=(e,i)=>{e.ownerDocument.body.removeEventListener("mousedown",m),document.body.removeEventListener("mousedown",m),e.removeEventListener("dragstart",D,{capture:!0}),t.runCommand(h.setStateContextMenu,{enabled:!0}),i.rteEditor.destroy(),i.rteEditorShallow.destroy()};t.on(a.frameLoad,async({window:e})=>{const i=e.document;A(s,i)}),t.onReady(()=>{A(s,document),l&&$(d,z,{target:document.body})}),t.setCustomRte({parseContent:!0,async enable(e,i,x){const u=T(e);if(u)return u.rteEditor;const g=await c(e,x);return g&&V(e,g),g==null?void 0:g.rteEditor},disable(e){const i=T(e);i&&(J(e),r(e,i))},getContent(e,i,x){var v;const u=T(e),g=u==null?void 0:u.rteEditor;return g&&!g.isDirty()?x.view.lastContent:g?(v=g.getContent)==null?void 0:v.call(g):e.innerHTML}});const b=K(t,o.enableOnClick);W({editor:t,licenseKey:o.licenseKey,plan:H,pluginName:q,cleanup:()=>{t.RichTextEditor.customRte=void 0,b()}})})});
|