使用工具栏图标添加Tinymce插件,使用Episerver CMS中的模块包12
我有一个自定义的 TinyMCE 插件,可以将工具栏图标添加到 tinymce 工具栏。插件在名为 editor_plugin.js 的文件中配置,该文件位于我的自定义 EpiServer 模块内。我需要这个来在tinyMCE 中注册。
- 我在startup.cs文件中添加了以下代码:
services.Configure<TinyMceConfiguration>(config =>
{
config.Default()
.AddEpiserverSupport()
.AddExternalPlugin("qbankmodule", "/QbankModule/TinyPlugin/editor_plugin.js")
.AppendToolbar("qbankmodule");
});
但我在TinyMCE工具栏区域中收到以下错误:
Failed to load plugin url: http://localhost:8000/EPiServer/EPiServer.Cms.TinyMce/3.1.0/ClientResources/tinymce/QbankModule/TinyPlugin/editor_plugin.js
我有以下问题:
- 如何将其指向QbankModule中的editor_plugin.js文件我将其作为QbankModule/TinyMCE/editor_plugin .js 但现在它正在从 EPiServer.Cms.TinyMce 模块加载。
- 因为我们的产品是这个 QbankModule,所以我们不需要在startup.cs 中注册它,而是需要使用 IConfigurableModule 使用自定义 TinyMce 初始化模块来注册它。任何人在这方面都有经验如何实施?
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.
- 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:
- 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.
- 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论