UNPKG

strapi-plugin-wysiwyg-react-md-editor

Version:
61 lines (60 loc) 1.72 kB
const __variableDynamicImportRuntimeHelper = (glob, path) => { const v = glob[path]; if (v) { return typeof v === "function" ? v() : Promise.resolve(v); } return new Promise((_, reject) => { (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path))); }); }; const strapi = { name: "wysiwyg-react-md-editor" }; const pluginPkg = { strapi }; const PLUGIN_ID = pluginPkg.strapi.name; const name = pluginPkg.strapi.name; const index = { register(app) { app.customFields.register({ name, type: "richtext", pluginId: PLUGIN_ID, intlLabel: { id: `${PLUGIN_ID}.label`, defaultMessage: PLUGIN_ID }, intlDescription: { id: `${PLUGIN_ID}.description`, defaultMessage: "The markdown text editor for every use case" }, components: { Input: async () => await import("./CustomField-DEds7xAj.mjs") } }); }, async registerTrads({ locales }) { const importedTrads = await Promise.all( locales.map((locale) => { return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-BiB0mZ2a.mjs"), "./translations/fr.json": () => import("./fr-C9d4o50X.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => { return { data, locale }; }).catch(() => { return { data: {}, locale }; }); }) ); return Promise.resolve(importedTrads); } }; export { PLUGIN_ID as P, index as i }; //# sourceMappingURL=index-B-Jyb2NZ.mjs.map