0
我在ckeditor中使用數學公式,當我通過textarea插入新內容時,它可以讀取數學公式,但是如果我編輯此內容,它似乎無法讀取和顯示文本公式之前..編輯ckeditor內容時無法讀取數學公式
這是我的源:
<head>
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['\\(','\\)']]}});</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="https://cdn.ckeditor.com/4.7.3/standard/ckeditor.js"> </script>
</head>
<body>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<span >Question Code : <%=id_q%> - <%=valid_types%> (Number presented : <%=make_cnt%>)</span>
<table border="0">
<tr>
<td width="640" height="650">
<textarea name="ir1" id="ir1" rows="1" cols="10" style="width:580px; height:600px; min-width:400px; min-height:50px; display:none;"></textarea>
<script>
var ir1 = CKEDITOR.replace('ir1', {
extraPlugins: 'mathjax,video,font,justify,preview,colorbutton,panelbutton',
mathJaxLib: 'https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-AMS_HTML'
});
CKFinder.setupCKEditor(ir1, 'libraries/ckfinder/');
</script>
</td>
</tr>
</table>
</body>
如何CKEditor的正確顯示mathjax當編輯內容?感謝
在瀏覽器開發控制檯中是否有任何錯誤?也請嘗試關閉任何第三方插件,然後檢查它是否仍然無法使用。 – f1ames
Hi @ f1ames:我已經檢查開發控制檯,它似乎不是錯誤,我不明白第三方插件,你能告訴更多關於這個嗎? – luongkhanh
第三方插件我的意思是所有不是由CKSource開發的插件(這裏是由CKSource開發的所有插件列表 - https://ckeditor.com/cke4/users/CKSource)。還有一個問題,你能提供一個在CKEditor中設置的輸入/數據(或者CKEditor初始化時在textarea中存在的輸入/數據)嗎? – f1ames