Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] In place editing can break formatting when using paste with html formatting #26

Open
KieranBrannigan opened this issue Feb 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@KieranBrannigan
Copy link
Contributor

Pasting content with html formatting in the in-place editor can break the syntax formatting.

To reproduce:

  1. Using Migaku Simplified Chinese note type.
  2. Sentence field has the text : 我去[wo3 qu4;未知词]查[Zha1;动词]了[le5;时态助词了]
  3. Use in-place editor to fix syntax: 我去[wo3 qu4;未知词]查[cha2;动词]了[le5;时态助词了]
  4. Alternate field text is: 我去[wo3 qu4;未知词]查[Zha1;动词]了[le5;时态助词了]
  5. Copy the cha2;动词 from sentence field and paste into the alternate field so we get: 我去[wo3 qu4;未知词]查[cha2;动词]了[le5;时态助词了]
  6. If we then look at the html of the alternate field we get: 我去[wo3 qu4;未知词]查[<span style="color: rgb(40, 40, 50); font-size: 24px;">cha2;动词</span>]了[le5;时态助词了]
  7. And the card will look like this:
    image

I think forcing all pasted content to be without formatting, (maybe a checkbox to disable in settings) would solve the problem. Would this cause problems elsewhere though? Perhaps with images/audio?

@KieranBrannigan KieranBrannigan added the bug Something isn't working label Feb 27, 2022
@KieranBrannigan
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant