UNPKG

@appricot/strapi-plugin-tinymce

Version:

Replaces the default Strapi WYSIWYG editor with a customized build of TinyMCE editor.

31 lines (29 loc) 790 B
"use strict"; module.exports = { getSettings: async (ctx) => { try { ctx.body = await strapi .plugin("tinymce") .service("settings") .getSettings(); } catch (err) { ctx.body = err; ctx.throw(500, err); } }, setSettings: async (ctx) => { const { body } = ctx.request; try { await strapi .plugin("tinymce") .service("settings") .setSettings(body); ctx.body = await strapi .plugin("tinymce") .service("settings") .getSettings(); } catch (err) { ctx.throw(500, err); } }, };