-
-
Notifications
You must be signed in to change notification settings - Fork 337
Description
Describe the bug
Math equations entered in the SunEditor using the KaTeX library (such as parentheses for matrices and square root signs) are not visible or rendered correctly after saving and displaying the content. Instead, raw LaTeX code or incomplete formatting appears, making the equations unreadable.
To Reproduce
Steps to reproduce the behavior:
Open the SunEditor with KaTeX enabled.
Enter a math equation using KaTeX syntax (e.g., matrices with parentheses, square roots).
Save the content and parse it to display elsewhere in the application (outside the editor).
Observe that the equation renders incorrectly or is invisible—only raw LaTeX or broken formatting shows.
Expected behavior
Math equations should be fully rendered and visually correct when displayed after saving, showing proper parentheses, square roots, and other math symbols as intended by KaTeX.
Screenshots:
In the editor
After displaying:
Editor view shows correct rendering of math equations.
Parsed/display view shows broken or missing parts of equations (parentheses missing or raw LaTeX code visible).
Desktop :
OS: Windows 10
Browser: Chrome
Version: 115.0
Smartphone :
Device: N/A (issue occurs primarily on desktop)
OS: N/A
Browser: N/A
Version: N/A
Additional context:
KaTeX CSS and JS files are correctly loaded globally in the application.