Adding TinyMCE plugin with toolbar icon using a module package in Episerver CMS 12

302 views Asked by At

I have a custom TinyMCE plugin that add a toolbar icon to the tinymce tool bar. Plugin is configured in a file called editor_plugin.js which is placed inside my custom EpiServer module. I need this to register in tinyMCE.

  1. I added following code in the startup.cs file:
services.Configure<TinyMceConfiguration>(config =>
        {
            config.Default()
                  .AddEpiserverSupport()
                 .AddExternalPlugin("qbankmodule", "/QbankModule/TinyPlugin/editor_plugin.js")
                  .AppendToolbar("qbankmodule");
        });

but I am getting following error in TinyMCE toolbar area:

Failed to load plugin url: http://localhost:8000/EPiServer/EPiServer.Cms.TinyMce/3.1.0/ClientResources/tinymce/QbankModule/TinyPlugin/editor_plugin.js

I Have following questions:

  1. How can I point this to the editor_plugin.js file in the QbankModule I have it as QbankModule/TinyMCE/editor_plugin.js but now it is loading from EPiServer.Cms.TinyMce module.
  2. Instead of registering this in the startup.cs since our product it this QbankModule, we need this to be registered using Customized TinyMce Initialization module using IConfigurableModule. Any one have experience in this area how to implement that?
0

There are 0 answers