UNPKG

strapi-plugin-jodit-editor

Version:

A powerful rich text editor plugin for Strapi v5 using the Jodit Editor with advanced formatting capabilities and seamless integration with Strapi's media library.

74 lines (73 loc) 1.36 kB
const bootstrap = ({ strapi }) => { }; const destroy = ({ strapi }) => { }; const register = ({ strapi }) => { strapi.customFields.register({ name: "jodit", plugin: "jodit-editor", type: "richtext", inputSize: { default: 12, isResizable: true } }); console.log("🎯 Jodit Editor plugin - SERVER REGISTER function called!"); console.log("🎯 Jodit custom field registered on server side successfully!"); }; const config = { default: {}, validator() { } }; const contentTypes = {}; const controller = ({ strapi }) => ({ index(ctx) { ctx.body = strapi.plugin("jodit-editor").service("service").getWelcomeMessage(); } }); const controllers = { controller }; const middlewares = {}; const policies = {}; const contentAPIRoutes = [ { method: "GET", path: "/", // name of the controller file & the method. handler: "controller.index", config: { policies: [] } } ]; const routes = { "content-api": { type: "content-api", routes: contentAPIRoutes } }; const service = ({ strapi }) => ({ getWelcomeMessage() { return "Welcome to Strapi 🚀"; } }); const services = { service }; const index = { register, bootstrap, destroy, config, controllers, routes, services, contentTypes, policies, middlewares }; export { index as default };