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

Gmail plain text mode is not detected #50

Open
adam-p opened this issue Feb 14, 2013 · 6 comments
Open

Gmail plain text mode is not detected #50

adam-p opened this issue Feb 14, 2013 · 6 comments

Comments

@adam-p
Copy link
Owner

adam-p commented Feb 14, 2013

Some time in the last six months Gmail changed it's plaintext mode from using something like a textarea to using the same contenteditable 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).

@jurgenvinju
Copy link

+1 thanks, and now I know what the problem was, so that is good too ;-)

@benbacardi
Copy link

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?

@slhck
Copy link

slhck commented Apr 8, 2014

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.

@benbacardi
Copy link

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?

@adam-p
Copy link
Owner Author

adam-p commented Apr 22, 2014

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.

@Peeja
Copy link

Peeja commented Oct 6, 2014

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.

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

5 participants