From b7bbded7e31ecb6187075fe87eed95b2f2bf985e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 21 Mar 2024 18:00:51 -0400 Subject: [PATCH] fix(client-side): only add full plugin list to certain editor configs --- lib/client/editorConfig.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/client/editorConfig.ts b/lib/client/editorConfig.ts index 9c4742b..0dde1cd 100644 --- a/lib/client/editorConfig.ts +++ b/lib/client/editorConfig.ts @@ -6,9 +6,7 @@ const reducer = (pv, cv) => { return { ...pv, [cv]: `plugins/${cv}/plugin.min.js` }; }; -const external_plugins = plugins.reduce((pv, cv) => { - return { ...pv, [cv]: `plugins/${cv}/plugin.min.js` }; -}, {}); +const external_plugins = plugins.reduce(reducer); const base_url = "/tinymce"; export const fancy = { branding: false, @@ -94,7 +92,7 @@ export const comment = { }, }, schema: "html5", - external_plugins, + external_plugins: ["link"].reduce(reducer), toolbar: "bold italic underline | link", contextmenu: "bold italic underline | paste | link", }; @@ -140,7 +138,7 @@ export const bare = { }, }, schema: "html5", - external_plugins, + external_plugins: ["link"].reduce(reducer), toolbar: "bold italic underline | hr link", contextmenu: "bold italic underline | paste | hr link", };