-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Gmail plain text mode is not detected #50
Comments
+1 thanks, and now I know what the problem was, so that is good too ;-) |
What was the fix for this? It still happens for me - would be nice if there was some kind of notification to warn me I'm in plain text mode? |
There was no fix, really. From what I conclude it's virtually impossible to detect whether you're in plain-text mode or not. So there's no way to warn you before sending. |
Oh that's a shame. No way to do something crazy like searching for the words 'Plain Text' that appear when you're in plain text mode? |
If someone could help figure out a way to detect this, that would be great. I spent some time a while ago trying to figure it out, with no success. If I remember correctly, the menu item that says "Plain text mode" and the checkbox beside it aren't actually added to the DOM until the little triangle button (menu pop-up) is clicked. So... simulate a click on that button and then look at the contents of the menu, and then simulate dismissing the menu? UGH. The mode flag is certainly stored in the page JS somewhere, and I hunted through the minified nightmare for a while, but couldn't figure it out. |
What about a slightly different approach: simulate the click, look for the checkmark next to "Plain text mode", and if it's there, turn it off for you. If I'm using Markdown Here, I'd actually like to be switched out of plain text mode. There precedent in the UI: using the text formatting tools while in plain text mode switches you to rich text mode. |
Some time in the last six months Gmail changed it's plaintext mode from using something like a
textarea
to using the samecontenteditable
element that it uses for rich edit mode (and it switches seamlessly to rich mode if the user formats the text).So now, if Gmail is in plain text mode Markdown Here will not notice. It will render the email without complaint, it will put the rendered content into the email body, and the email will be sent without apparent problem. But the recipient will get only the plain text version of the email.
This is fairly severe. There's no indication of what the problem is, and it will be very disappointing to users to find that their MDH efforts have been wasted. (I've had one user who encountered this behaviour and, quite reasonably, thought that MDH was broken.)
I'm not sure what the fix is yet. I hope there's an attribute or style that can be checked (which means an unpleasant special-case check, but... maybe no choice).
The text was updated successfully, but these errors were encountered: