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

Frequent "unsaved message" warnings when using markdown editor #2

Open
tzsebe opened this issue Aug 26, 2024 · 1 comment
Open

Frequent "unsaved message" warnings when using markdown editor #2

tzsebe opened this issue Aug 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@tzsebe
Copy link

tzsebe commented Aug 26, 2024

Thanks again for building this awesome extension!

One issue I often run into is getting "unsaved changes" warnings.

I think it comes from saving the markdown, then the backend doing its own formatting, and returning it back to you slightly different (e.g. adding the optional "alt text" field as an empty string in links).

The easiest way to repro:

  1. Create a card.
  2. Add a line of description text (with a trailing space at the end of the line).
  3. Save (or just do CTRL-Enter)
  4. Click out of the card
  5. Re-open the card

It will have the "unsaved message" warning. If you look at the text, it will be missing the trailing space.

If I discard the unsaved change, it puts the trailing space back, so presumably, the original text is available somewhere. I think what's happening is, you're saving the text as-is, but using the output from the "view markdown" link on the WYSIWYG editor when loading, which is formatting the markdown, and when you load that in the card somewhere, it detects the diff. The main thing still gets saved, it just gets altered when it reloads it.

I'm not sure if there's a clean and safe way to work around this. I definitely wouldn't want you to hide those warnings or forcefully discard changes, as that might result in data loss.

@sewerynkalemba
Copy link
Contributor

Hi @tzsebe,

I released a new version just now amid recent Trello changes to the card back. Let me know if the issue persists.

@sewerynkalemba sewerynkalemba added the bug Something isn't working label Sep 22, 2024
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

2 participants