A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Eivind,
Have you tried just using the _ContextMixin?
define([
"dojo/when",
"epi-addon-tinymce/tinymce-loader",
"epi/shell/_ContextMixin"
], function (
when,
tinymce,
_ContextMixin,
) {
tinymce.PluginManager.add("custom-plugin", function (editor) {
var context = new _ContextMixin();
when(context.getCurrentContext()).then(function (content) {
//TODO: custom code
});
return {
getMetadata: function () {
return {
name: "custom plugin",
url: "https://www.custom.com"
};
}
};
});
});
Hi,
TL;DR: Is it possible to get the Episerver context in a custom TinyMCE plugin?
I'm trying to migrate a custom plugin in TinyMCE after upgrading to Episerver 11 and TinyMCE 2.8.0.
The plugin uses
epi_page_contextwhich is available but empty in editor.settings after upgrading. In Episerver 10,SetPageDataContextcould be used to set the context based on the supplied page https://world.episerver.com/documentation/Class-library/?documentId=cms/10/10AD80F5.Are there any equivalent methods of getting the Episerver context in a custom TinyMCE plugin?