fix(client-side): only add full plugin list to certain editor configs
This commit is contained in:
parent
82faaa5179
commit
b7bbded7e3
@ -6,9 +6,7 @@ const reducer = (pv, cv) => {
|
|||||||
return { ...pv, [cv]: `plugins/${cv}/plugin.min.js` };
|
return { ...pv, [cv]: `plugins/${cv}/plugin.min.js` };
|
||||||
};
|
};
|
||||||
|
|
||||||
const external_plugins = plugins.reduce((pv, cv) => {
|
const external_plugins = plugins.reduce(reducer);
|
||||||
return { ...pv, [cv]: `plugins/${cv}/plugin.min.js` };
|
|
||||||
}, {});
|
|
||||||
const base_url = "/tinymce";
|
const base_url = "/tinymce";
|
||||||
export const fancy = {
|
export const fancy = {
|
||||||
branding: false,
|
branding: false,
|
||||||
@ -94,7 +92,7 @@ export const comment = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
schema: "html5",
|
schema: "html5",
|
||||||
external_plugins,
|
external_plugins: ["link"].reduce(reducer),
|
||||||
toolbar: "bold italic underline | link",
|
toolbar: "bold italic underline | link",
|
||||||
contextmenu: "bold italic underline | paste | link",
|
contextmenu: "bold italic underline | paste | link",
|
||||||
};
|
};
|
||||||
@ -140,7 +138,7 @@ export const bare = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
schema: "html5",
|
schema: "html5",
|
||||||
external_plugins,
|
external_plugins: ["link"].reduce(reducer),
|
||||||
toolbar: "bold italic underline | hr link",
|
toolbar: "bold italic underline | hr link",
|
||||||
contextmenu: "bold italic underline | paste | hr link",
|
contextmenu: "bold italic underline | paste | hr link",
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user