itsalltext
itsalltext copied to clipboard
IAT! doesn't work with GMail's new compose experience
I wouldn't expect it to because it doesn't use a textarea
anymore.
It seems to use a body
element like so:
<body id=":lm" class="editable LW-avf"
style="min-width: 0px; width: 577px; border: 0px none; margin: 0px;
background: none repeat scroll 0% 0% transparent; height: 100%;
overflow: hidden; direction: ltr; min-height: 420px;"
hidefocus="true" g_editable="true" role="textbox"></body>
I haven't done enough investigation to see how easy or hard it would be to special-case IAT! to make editing the content here possible, but I did notice that it seems to represent the text as HTML DOM elements... which isn't so promising.
Anyway, I suspect editing content in GMail is a primary activity for IAT! users so it'd be nice if we can find a way to make it work with the new compose experience.
I suppose a workaround for this issue, when the new compose experience becomes the default and the old one goes away, would be to use GMail's basic HTML mode, but that means no keyboard shortcuts among other things:
http://support.google.com/mail/answer/15049?hl=en
I find a solution by using having 2 shorcuts to my gmail, one using the simple html version of gmail and the other the full version (ajax), if I want to use it's all text I click on the simple html version
2013/3/30, Jamu Kakar [email protected]:
I wouldn't expect it to because it doesn't use a
textarea
anymore. It seems to use abody
element like so:<body id=":lm" class="editable LW-avf" style="min-width: 0px; width: 577px; border: 0px none; margin: 0px; background: none repeat scroll 0% 0% transparent; height: 100%; overflow: hidden; direction: ltr; min-height: 420px;" hidefocus="true" g_editable="true" role="textbox"></body>
I haven't done enough investigation to see how easy or hard it would be to special-case IAT! to make editing the content here possible, but I did notice that it seems to represent the text as HTML DOM elements... which isn't so promising.
Anyway, I suspect editing content in GMail is a primary activity for IAT! users so it'd be nice if we can find a way to make it work with the new compose experience.
Reply to this email directly or view it on GitHub: https://github.com/docwhat/itsalltext/issues/36
@viaa: what are the shortcut URLs? Thanks.
basic html view url: https://mail.google.com/mail/h/ full view: http://www.gmail.com
2013/4/3 Nathan Collins [email protected]
@viaa https://github.com/viaa: what are the shortcut URLs? Thanks.
— Reply to this email directly or view it on GitHubhttps://github.com/docwhat/itsalltext/issues/36#issuecomment-15805711 .
I'm an "me too" for this issue...
If I recall correctly, Pentadactyl's shortcut for editing in an external editor (gvim by default, of course) does work in Gmail's new compose window, maybe their source code could serve as inspiration.
Vimperator's shortcut key for editing in an external editor does work too, in the sense that it opens the external editor (emacsclient in my case) but the buffer that is opened is not empty; it contains the body element noted in the first comment here. Deleting the body element and writing in the emptied buffer does not help: Upon future edits (from Gmail to external editor) the same body element appears with the new text embedded in the buffer. One hack I can think of is to write a hook in Emacs to remove everything but text every time we go to a buffer. But first IAT must be able to open the external editor as it used to (and as Vimperator or Pentadactyl do).
Gmail rolled out the new compose today so I had to fix this. Not sure it's an acceptable solution but the patch is available at: https://github.com/patjak/itsalltext/commit/2e671f65745466d1aff71c6443df706a6c90f0c5
Thanks Patrik!
ITA maintainers: will this patch make it into the official ITA and then an add-on update soon, or should I install Patrik's fork from source (not sure how to do this with Firefox add-ons) if I want to run this feature soon?
On Thu, Aug 15, 2013 at 3:21 PM, Patrik Jakobsson [email protected] wrote:
Gmail rolled out the new compose today so I had to fix this. Not sure it's an acceptable solution but the patch is available at: patjak@2e671f6
— Reply to this email directly or view it on GitHub.
I'll take a look at it this weekend.
There's a problem with my approach though. I'm fetching the "innerHTML" which contain HTML entities instead of pure text. Gonna see if I can get innerText / textContent instead.
@patjak
It only works for me with the to/cc line.
If I could tell when the editor exited a better approach would be to write a separate plugin that calls IAT and gets text back. However, Firefox doesn't support that. :-(
Ciao!
@docwhat Did you try the hot-key? The gumdrop doesn't appear for me though it is added in the DOM tree. Don't know how to catch the "editor exit" either, though I don't see how it's related to this issue. I'm using Firefox 23 if that is any help.
Thanks
No I didn't try the hot-key. I did try the context menu and it was missing as well.
The "editor exit" thing was just me being annoyed at Firefox. :-)
Ciao!
Christian Höltje http://docwhat.org/
On Aug 17, 2013, at 9:44 AM, Patrik Jakobsson [email protected] wrote:
@docwhat Did you try the hot-key? The gumdrop doesn't appear for me though it is added in the DOM tree. Don't know how to catch the "editor exit" either, though I don't see how it's related to this issue. I'm using Firefox 23 if that is any help.
Thanks
— Reply to this email directly or view it on GitHub.
Is the patch actually working welll? I've been contemplating downloading manually building IAT! to try it out but haven't made time for it... since it sounds like there are issues I thought I'd ask before going ahead with that.
I need to sort out converting html entities (& stuff) back and forth between the editor and gmail. Other than that it seems ok.
Patjak: what is the "it" that seems OK? Is there a version of IAT that (mostly) works with the new Gmail?
A user review mentioned IAT works if you use Old Compose to get to the old compose window in GMail. I haven't tried it, but it looks helpful.
The "Old Compose" Firefox extension (which is available via the normal FIrefox add-ons mechanism) does indeed get you back to the old textarea-based "compose" interface and, unsurprisingly, IAT works just as it ever did.
I guess that makes this a less urgent issue, for me at least. But a fix to work with the new interface would still be a Very Good Thing.
Watch out! The new version of "Old Compose" that is now in beta does not seem to support IAT.
So if you are using it as a way to keep IAT functionality for email, contact them now and squeal!
I don't know how to build Firefox extensions and install them locally, so I haven't tried @patjak's patch yet. Will it be included in It's All Text!? If the problem is that it get's you HTML instead of plain text, I'd like to remark that I don't believe that's a problem:
-
GMail's new format really is HTML, why pretend it's not?
-
Good text editors help either by a) providing support for editing HTML markup or b) more radically, by hiding the HTML tags and letting you edit as if the text were plain.
For example, Emacs has
gmail-message-mode
that will let you edit a GMail HTML message as if it were Markdown (by transparently converting to and from HTML when you load and save). This is even better than somehow faking a pure plain text message, because you can still just use plain text if you want to, but additionally you could include, say, nicely formatted links (when emailing someone who doesn't mind formatted messages).
It think it would be great if It's All Text worked in the new GMail compose window giving me HTML to edit, and left it up to me how to deal with that.
EDIT: Instead of learning the proper way to make my own local version of the extension with @patjak's patch, I tried just unpacking and editing the extension. That works! I simplified the patch a little bit so that it doesn't muck around with the HTML and am now happily using it.
Nice. I've been using http://oldcompose.com/ and that allows me to use an unmodified IAT! I also prefer the old experience, so it's kind of a double win.
@oantolin So are you using the hot-key then?
Yes, @docwhat, and not just for the GMail compose box, but everywhere. I configure It's All Text with no buttons and alt-Enter as the hot-key. (I prefer to use the keyboard for as much as I can, because it feels much faster than using the trackpad on my laptop.)
As the author of gmail-message-mode (mentioned by @oantolin) I'd love to see something like @oantolin's solution implemented. It's not necessary to hack into the html and convert it, just let the editor take care of that.
@oantolin Could you please publish your modified patch somewhere? I'd like to try it, as your approach (IAT
without HTML modifications + gmail-message-mode
) seems to be the cleanest IMO.
@ffevotte Spurred on by your request I learned a tiny bit of github and git, just enough to fork @patjak's repository, make the tiny change I made and publish it on github. Here's the diff.
Thanks a lot! I can confirm that @oantolin's patched version of IAT!
works perfectly well along with @Bruce-Connor's gmail-message-mode
I can only second @Bruce-Connor's wish to see @oantolin's patch merged in the next official IAT!
version.
I'll take a look in a bit. I'm at a conference at the moment.
@ffevotte could you share the patched addon somewhere? (linux binary in case it's possible).