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

Message content changes when editing it #18834

Closed
ItsDrike opened this issue Aug 29, 2021 · 3 comments
Closed

Message content changes when editing it #18834

ItsDrike opened this issue Aug 29, 2021 · 3 comments

Comments

@ItsDrike
Copy link

Your use case

What would you like to do?

Once I sent a message with some specific markdown styling and I go back to it, I'd like it to remain the same, rather then to pull the body of that message I sent and ignoring that markdown styling done on it.

This causes issues with messages like these

\+ Some message starting with + that has som typo in it

then I go back and edit it

+ Some message starting with + that has some typo in it

but the \ before the + is now gone, turning the message into a list element.

Why would you like to do it?

It is really annoying, especially in bigger messages, to have to go through the message body all over again and do the necessary adjustments to keep the message the same. This also happens with something like linking with

some [samle][1] text
[1]: <http://example.com> "My Link"

that for some reason gets converted into:

some [sample](http://example.con) text

which makes it really hard to meaningfully edit rich messages. Not to mention how annoying this can be when sending things with /html and having to edit that as raw text, that just makes no sense.

How would you like to achieve it?

Element should probably keep a buffer of raw messages that were sent which should be what will appear in the edit box, rather than having the message appear in a completely different format from the one it was sent with.

Have you considered any alternatives?

No response

Additional context

No response

@ShadowJonathan
Copy link
Contributor

I believe a better (developer-termed) name for this issue would be "editing doesn't roundtrip correctly".


Element should probably keep a buffer of raw messages that were sent which should be what will appear in the edit box

I disagree, this doesn't fix the actual problem, as editing a message from "very long ago" would revert to the previous behaviour, I think a either switch to pure markdown sending and rendering, or a more verbose html output, could solve this.

@ItsDrike
Copy link
Author

ItsDrike commented Aug 30, 2021

I believe a better (developer-termed) name for this issue would be "editing doesn't roundtrip correctly".

Good catch, I didn't know how to call it, thanks.

Element should probably keep a buffer of raw messages that were sent which should be what will appear in the edit box

I disagree, this doesn't fix the actual problem, as editing a message from "very long ago" would revert to the previous behaviour. I think a either switch to pure markdown sending and rendering, or a more verbose html output, could solve this.

Yeah, I'm aware of this and I realized it when I sent the request, but to keep the true message content cross-client compatible, changing it may not be a viable way to solve this, that's why I suggested a message buffer. It isn't a perfect solution but most people won't edit messages older than a day so it would be sufficient for most, but yes it's not great.

Sending raw unedited markdown message would certainly be better, though I'm not completely familiar with the inner working of the project and how it handles these things specifically, I'd imagine the real message content is being sent as HTML, and if that's the case I don't think that on editing, you should be seeing the actual HTML code (unless that's what you sent), since HTML can be relatively confusing to many people not that experienced with it. It also makes it much more intensive to properly edit your message, especially with a more extensively formatted messages which would have the content very cluttered with HTML elements.

@SimonBrandner
Copy link
Contributor

Thank you for your report.

It seems you're not the only one to have come across this bug, as it's been reported previously - see #10725. I'm going to close this issue now so we can focus on that issue. Please watch, vote or comment on that issue if there is any additional information you can provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants