noledgebin / frontend

NoledgeBin is a zero-knowledge pastebin
https://andinus.unfla.me/noledgebin/
GNU Affero General Public License v3.0
1 stars 1 forks source link

Copying from decrypted section and pasting again preserves formatting #19

Closed andinus closed 2 years ago

andinus commented 2 years ago

Formatting should be removed when the user tries pasting back the data they copied. While we can add Clone functionality that will remove the need to do this but this should not occur.

To reproduce

2021-10-28-221217_724x287_scrot

2021-10-28-221228_628x562_scrot

Behavior

It pastes along with formatting.

Expected

Formatting should be removed.

andinus commented 2 years ago

Related:

andinus commented 2 years ago

Using contenteditable is a bad idea. To fix this you need to strip formatting, figure out cursor's location and then add the data at that position. It adds to complexity without any benefits.