简体   繁体   English

TinyMCE 的 MathType 外部插件不工作

[英]MathType External Plugin for TinyMCE not working

I'm trying to integrate MathType into my TinyMCE editor but I get the following error:我正在尝试将 MathType 集成到我的 TinyMCE 编辑器中,但出现以下错误:

Uncaught TypeError: tinymce.create is not a function
    at 2 (plugin.js:1:163253)
    at __webpack_require__ (plugin.js:1:208570)
    at plugin.js:1:208973
    at plugin.js:1:208997

I'm using the external plugin route as described here:我正在使用此处描述的外部插件路由:

https://docs.wiris.com/mathtype/en/mathtype-integrations/mathtype-web-interface-features/external-integration.html https://docs.wiris.com/mathtype/en/mathtype-integrations/mathtype-web-interface-features/external-integration.html

My code (partial):我的代码(部分):

function create_tinymce(element){
            //alert(element)
            document.getElementById("savePost").style.display = 'block';

            tinymce.init({
                selector: element,
                inline: true,
                //skin: 'jb',
                custom_elements: 'dictTerm',
                extended_valid_elements: 'dictTerm',
                content_css : 'css/stylesheet.css',
                menubar: false,
                toolbar: 'undo redo | table image | alignleft aligncenter bullist numlist | forecolor backcolor link | h2 calculationBox importantBox | tiny_mce_wiris_formulaEditor code',
                plugins: 'code image lists link preview table',
                external_plugins: { tiny_mce_wiris: 'https://www.wiris.net/demo/plugins/tiny_mce/plugin.js' },

I am also loading in jQuery and he tinyMCE plugin before the html loads:在 html 加载之前,我也在加载 jQuery 和他的 tinyMCE 插件:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.tiny.cloud/1/###APIKEYHIDDEN###/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
<script src="https://cdn.tiny.cloud/1//###APIKEYHIDDEN###/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
<script src="https://cdn.jsdelivr.net/npm/@tinymce/tinymce-jquery@2/dist/tinymce-jquery.min.js"></script>

Does anyone know what might be going wrong?有谁知道可能出了什么问题? Any help would be greatly appreciated.任何帮助将不胜感激。

Thank you!谢谢!

In order to solve the issue, is it possible that there are missing closing tags in your code?为了解决这个问题,您的代码中是否可能缺少结束标记?

tinymce.init({
    selector: '#additional-information',
    .
    .  
    .
}); ----> **this is missing?**

You can find more information here .您可以在此处找到更多信息。

If you are still facing issues, please do not hesitate contacting us at support@wiris.com如果您仍然遇到问题,请随时通过 support@wiris.com 联系我们

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM