[GH-ISSUE #1222] Pasting into the task description doesn't preserve <sub> and <sup> tags #6335

Open
opened 2026-04-20 16:55:10 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @bernardosulzbach on GitHub (Aug 2, 2025).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/1222

Description

Vikunja's task description editor is an HTML WYSIWYG thing. Is it intentional that it does not preserve <sub> and <sup> tags when pasting?

Even though most of the time I wish we had a simple markdown editor, the HTML thing has one big advantage to how I use Vikunja: sometimes, I copy-paste chunks from webpages that a task needs to reference instead of adding just a link with a fragment both to avoid having to go there again in the future and to get rid of the risk of having a broken link in a few months. When I do that, it basically just works and that's fantastic. Except for the <sub> and <sup> tags.

That can actually really impair legibility in some cases. Is this easy to change? Is there a reason not to change it? Having <sub> and <sup> buttons in the editor would also be nice, but I don't think I would use them often.

I chose the "Bug" type, but feel free to change it to a feature request, if that makes more sense to you.

Vikunja Version

v0.24.6

Browser and version

Chrome Version 138.0.7204.184 (Official Build) (64-bit)

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

Originally created by @bernardosulzbach on GitHub (Aug 2, 2025). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/1222 ### Description Vikunja's task description editor is an HTML WYSIWYG thing. Is it intentional that it does not preserve `<sub>` and `<sup>` tags when pasting? Even though most of the time I wish we had a simple markdown editor, the HTML thing has one big advantage to how I use Vikunja: sometimes, I copy-paste chunks from webpages that a task needs to reference instead of adding just a link with a fragment both to avoid having to go there again in the future and to get rid of the risk of having a broken link in a few months. When I do that, it basically **just works** and that's fantastic. Except for the `<sub>` and `<sup>` tags. That can actually really impair legibility in some cases. Is this easy to change? Is there a reason not to change it? Having `<sub>` and `<sup>` buttons in the editor would also be nice, but I don't think I would use them often. I chose the "Bug" type, but feel free to change it to a feature request, if that makes more sense to you. ### Vikunja Version v0.24.6 ### Browser and version Chrome Version 138.0.7204.184 (Official Build) (64-bit) ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_
GiteaMirror added the area/task-editorconcern/ux labels 2026-04-20 16:55:10 -05:00
Author
Owner

@kolaente commented on GitHub (Aug 3, 2025):

No real reason, maybe only due to the fact that you can't set sup/sub text in the editor. Would love a PR to fix this.

<!-- gh-comment-id:3148413228 --> @kolaente commented on GitHub (Aug 3, 2025): No real reason, maybe only due to the fact that you can't set sup/sub text in the editor. Would love a PR to fix this.
Author
Owner

@bernardosulzbach commented on GitHub (Aug 4, 2025):

And would it be fine to just allow it when pasting, or is it the only way to make the editor support it?

<!-- gh-comment-id:3152120233 --> @bernardosulzbach commented on GitHub (Aug 4, 2025): And would it be fine to just allow it when pasting, or is it the only way to make the editor support it?
Author
Owner

@kolaente commented on GitHub (Aug 5, 2025):

IIRC the editor only renders what it supports. That means in order for it to allow pasted content like this, it will need to support it in general.

There is a mark which supports this in the core, so integration should be relatively easy:

https://v2.tiptap.dev/docs/editor/extensions/marks/subscript
https://v2.tiptap.dev/docs/editor/extensions/marks/superscript

<!-- gh-comment-id:3155073145 --> @kolaente commented on GitHub (Aug 5, 2025): IIRC the editor only renders what it supports. That means in order for it to allow pasted content like this, it will need to support it in general. There is a mark which supports this in the core, so integration should be relatively easy: https://v2.tiptap.dev/docs/editor/extensions/marks/subscript https://v2.tiptap.dev/docs/editor/extensions/marks/superscript
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#6335