Open kimyk5527 opened 1 year ago
I've made a plugin for adding this, and for adding buttons for super and subscript. I could share it, so it can be used as a plugin if it's not desired to modify the main package. The plugin is not in TypeScript, so it would need some work to add it to the main package.
@ahamelers First of all, thank you for your help. I'm using toast ui editor using javascript, can I use the plugin you made in javascript? Can you tell me how to use it?
@kimyk5527 Yes, you can use it. I have not published it on npm, but if you are using node, you can add it to your package.json as a dependency directly as a git package.
"dependencies": {
"@toast-ui/subsup-plugin": "https://github.com/ahamelers/tui.editor.subsup_plugin.git",
}
If more people want the plugin, and the maintainers do not want to take it and add it to the main project, I'll consider publishing it.
You can use it as any other plugin: https://github.com/nhn/tui.editor/blob/master/docs/en/plugin.md
@ahamelers Can you show me how to use it in code on vanillaJS? I tried to use it, but it didn't work out.
Sorry, it is a node package with imports etc. I think it would need to be built and exported for use in plain JS
@ahamelers Can you show me how to use it in code on vanillaJS? I tried to use it, but it didn't work out.
https://github.com/nhn/tui.editor/issues/2083#issuecomment-989610546 maybe this way can help you
@artsooter Thank you for your help. But I'm saving it using getHTML(). When I run getHTML(), the sub
tag and sup
tag disappear. When I write originalText <sub>subText</sub> <sup>supText</sup>
, it changes to originalText subText supText
.
Version
latest
Development Environment
chrome
Current Behavior
If I write using the upper subscript (< sup >) and the lower subscript (< sub >), and save using getHTML, that tag disappears.
Expected Behavior
Please do not let < sup > and < sub > tags disappear or add the upper and lower subscripts to the markdown grammar.