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

Conversion might cause data loss #97

Closed
lihlii opened this issue Aug 28, 2013 · 4 comments
Closed

Conversion might cause data loss #97

lihlii opened this issue Aug 28, 2013 · 4 comments

Comments

@lihlii
Copy link

lihlii commented Aug 28, 2013

If you modify the text when you're in the converted state, and click MarkdownHere button to convert back to original text again, you will risk losing some or even all of your text!

If you enabled HTML source editor mode and click MarkdownHere button in HTML source editor window, you will risk losing all your input text.

If you save the draft message and open it again for further editing, MarkdownHere may convert the text into wrong format of quoted block, because Thunderbird will beautify the HTML code with indention and MarkdownHere can't handle it correctly.

Solution: The HTML text should be converted back to plain text, before formatting them with Markdown. You can do it manually by copying the text, then Ctrl+Shift+V to paste plain text, then click MarkdownHere button to format them.

There should be a transform status feedback, when switching on and off of Markdown conversion. eg, MarkdownHere button pressed down or released up.

Conversion done by MarkdownHere is NOT recorded in Thunderbird undo history, so you can NOT revert it by pressing Ctrl+Z to undo the edit! This will cause data loss if you're not cautious when using MarkdownHere.

@adam-p
Copy link
Owner

adam-p commented Oct 16, 2013

If you modify the text when you're in the converted state, and click MarkdownHere button to convert back to original text again, you will risk losing some or even all of your text!

Yes, this is how Markdown Here works. Issue #33 discusses at least warning when losing changes, or converting the modified HTML back to MD.

If you enabled HTML source editor mode and click MarkdownHere button in HTML source editor window, you will risk losing all your input text.

What application/site are you referring to? But, generally, yes, if the editor isn't an ordinary rich editor (like some of the write-raw-HTML modes I've seen), then there's going to be a problem.

If you save the draft message and open it again for further editing, MarkdownHere may convert the text into wrong format of quoted block, because Thunderbird will beautify the HTML code with indention and MarkdownHere can't handle it correctly.

I see. I created a separate issue for this bug: #125

There should be a transform status feedback, when switching on and off of Markdown conversion. eg, MarkdownHere button pressed down or released up.

I created a separate issue for this: #126. And to quote myself:

This is complicated by the fact that rendering can be done piecemeal via selection. So a compose area can be partly rendered and partly unrendered. There could be a third button state to indicate this.

Conversion done by MarkdownHere is NOT recorded in Thunderbird undo history, so you can NOT revert it by pressing Ctrl+Z to undo the edit! This will cause data loss if you're not cautious when using MarkdownHere.

Yep. I mention in the README to be cautious of undo (although for Gmail).

Maybe it's possible for an extension to push an edit into Thunderbird's undo history? I did some googling and couldn't find anything, but it seems like it should be possible.

I'm closing this issue, since I broke out the individual issues. Feel free to make more issues as you find them.

@adam-p adam-p closed this as completed Oct 16, 2013
@sorashadow
Copy link

When using pure HTML in Thunderbird, when you toggle "Markdown Here", it doesn't convert in into, let's say, HTML flavored text (e.g. '''' font color="red" '''' [...] '''' /font ''''). When you untoggle, the HTML tag disapears and the text is rendered...
One more thing... Sometimes, when you toogle Markdown, it maintain the original font of the previous e-mail, not the font I prefer to use.

@adam-p
Copy link
Owner

adam-p commented Oct 22, 2013

When using pure HTML in Thunderbird, when you toggle "Markdown Here", it doesn't convert in into, let's say, HTML flavored text (e.g. '''' font color="red" '''' [...] '''' /font ''''). When you untoggle, the HTML tag disapears and the text is rendered...

That's busted behaviour. I created a new issue for it: #133

One more thing... Sometimes, when you toogle Markdown, it maintain the original font of the previous e-mail, not the font I prefer to use.

Markdown Here's default styling doesn't specify a font (on purpose). But it's pretty easy to set one yourself -- instructions here: https://github.com/adam-p/markdown-here/wiki/Tips-and-Tricks#wiki-mainfont

@sorashadow
Copy link

Thanks for the fast reply, Adam. ^_^

2013/10/22 Adam Pritchard notifications@github.com

When using pure HTML in Thunderbird, when you toggle "Markdown Here", it
doesn't convert in into, let's say, HTML flavored text (e.g. '''' font
color="red" '''' [...] '''' /font ''''). When you untoggle, the HTML tag
disapears and the text is rendered...

That's busted behaviour. I created a new issue for it: #133#133

One more thing... Sometimes, when you toogle Markdown, it maintain the
original font of the previous e-mail, not the font I prefer to use.

Markdown Here's default styling doesn't specify a font (on purpose). But
it's pretty easy to set one yourself -- instructions here:
https://github.com/adam-p/markdown-here/wiki/Tips-and-Tricks#wiki-mainfont


Reply to this email directly or view it on GitHubhttps://github.com//issues/97#issuecomment-26801514
.

“Thinking of you, wherever you are. We pray for our sorrows to end, and
hope that our hearts will blend. Now I will step forward to realize this
wish. And who knows: starting a new journey may not be so hard, or maybe it
has already begun. There are many worlds, but they share the same sky – one
sky, one destiny."

Kingdom Hearts 2

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

No branches or pull requests

3 participants