You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is sort of a combined bug / feature request. It is a bug in the sense that the package did not do what the user (developer) expected.
StrikeThroughSupSubToggles should support common markdown syntax for superscript and subscript as are commonly found in science/math and in technical documentation.
The current behaviour outputs HTML sup and sup elements however this is incompatible with many Markdown/MDX configurations especially those that adopt the common practice of sanitizing all HTML.
I think the current behaviour should continue to be supported however I propose an additional prop/option be added for the developer to choose their preference for HTML or markdown output.
Proposed Pandoc Syntax Support
The Pandoc style is very common to represent superscript and subscript in Markdown e.g.
m^2^
E=mc^2^
CO~2~
Per Pandoc spec:
if the superscripted or subscripted text contains spaces, these spaces must be escaped with backslashes. (This is to prevent accidental superscripting and subscripting through the ordinary use of ~ and ^.) Thus, if you want the letter P with ‘a cat’ in subscripts, use Pa\ cat, not Pa cat.
Reproduction
I don't think a repro is necessary to communicate the issue.
To Reproduce
Define toolbarPlugin with toolbarContents that includes:
Use the editor and add superscript/subscript. Note the raw markdown/mdx generated uses HTML sup and sup tags and there is no option to support the more idiomatic / expected syntax used by the community to represent superscript and subscript.
Expected behavior
I expect that the official plugin and toolbar for Sup/Sub would at least provide an option for pandoc sup/sub over HTML.
Additional context
Add any other context about the problem here.
This discussion was converted from issue #829 on July 31, 2025 05:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
This is sort of a combined bug / feature request. It is a bug in the sense that the package did not do what the user (developer) expected.
StrikeThroughSupSubTogglesshould support common markdown syntax for superscript and subscript as are commonly found in science/math and in technical documentation.The current behaviour outputs HTML
supandsupelements however this is incompatible with many Markdown/MDX configurations especially those that adopt the common practice of sanitizing all HTML.I think the current behaviour should continue to be supported however I propose an additional prop/option be added for the developer to choose their preference for HTML or markdown output.
Proposed Pandoc Syntax Support
The Pandoc style is very common to represent superscript and subscript in Markdown e.g.
Per Pandoc spec:
Reproduction
I don't think a repro is necessary to communicate the issue.
To Reproduce
Define
toolbarPluginwithtoolbarContentsthat includes:Use the editor and add superscript/subscript. Note the raw markdown/mdx generated uses HTML sup and sup tags and there is no option to support the more idiomatic / expected syntax used by the community to represent superscript and subscript.
Expected behavior
I expect that the official plugin and toolbar for Sup/Sub would at least provide an option for pandoc sup/sub over HTML.
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions