Open uniconnector opened 6 months ago
I took a look at the editingDowncast and realized that I needed to save the Katex formula in HTML format.
@uniconnector If there's no objection, I added formatting to the original post.
I took a look at the editingDowncast and realized that I needed to save the Katex formula in HTML format.
Would you consider this resolved?
@tony Saving HTML can indeed solve the problem, but the project itself relies on the markup format, so the cost of replacement is relatively high. I have made some attempts, and currently, the summary needs to follow the framework requirements of the ckeditor to solve it, otherwise normal saving cannot be carried out.
This seems more like a support issue than a bug at the moment. I can't give support, I'll clarify if there's a bug or not.
ckeditor5-math uses MathCommand
(definition, usage), I don't believe editor.setData('\[ x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \]');
would render a formula.
In regards to "Saving HTML", can you give an example of what HTML you're saving when it works? It may be working as intended.
This seems more like a support issue than a bug at the moment. I can't give support, I'll clarify if there's a bug or not.
ckeditor5-math uses
MathCommand
(definition, usage), I don't believeeditor.setData('\[ x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \]');
would render a formula.In regards to "Saving HTML", can you give an example of what HTML you're saving when it works? It may be working as intended.
For instance, I have integrated the math plugin into my angular application and I am trying to pass the math equation directly from the application to the editor but it is not able to render it.
onSubmit(){
const equation = "x = {-b \pm \sqrt{b^2-4ac} \over 2a}.";
this.editor.execute( 'math', equation, true, 'script', true);
}
But, when I am trying rendering this equation(\(ax^2 + bx + c = 0\)
) it is working fine.
onSubmit(){
const equation = "\(ax^2 + bx + c = 0\)";
this.editor.execute( 'math', equation, false, 'script', true);
}
What am I missing?
index.html
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
Add formula content to the file: