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

Support divs with contenteditable=true #72

Open
davidshepherd7 opened this issue Jun 26, 2015 · 3 comments
Open

Support divs with contenteditable=true #72

davidshepherd7 opened this issue Jun 26, 2015 · 3 comments

Comments

@davidshepherd7
Copy link

Google inbox uses a div with contenteditable="true" instead of a textarea for email composition (which seems like a stupid idea to me...). It would be great if itsalltext could support editing this.

I might have a go at implementing this myself, do you think it's possible? Any pointers?

@xOneca
Copy link
Contributor

xOneca commented Jun 26, 2015

I don't think it would be hard to implement this. See discussion in #36.

But keep in mind that contenteditable elements usually contain HTML code, so what you will edit with the external editor will be pure HTML.

@davidshepherd7
Copy link
Author

I had a quick attempt, I got it sort of working by just adding

(tag == 'div' && node.getAttribute('contenteditable') == "true")

to the expression for is_disabled in onContextMenu. However it seemed
be flaky: sometimes the button wouldn't appear and sometimes the context
menu wouldn't appear. It wasn't obvious to me why this was happening, but
then I don't really know what I'm doing with Firefox extensions.

But the main problem is the html, as you said. I don't think that's going
to be a convenient way to write emails. Probably the best fix at this point
is to pester google to add an option to use plain text (there's one for
gmail, so hopefully they'll do it eventually).

@docwhat
Copy link
Owner

docwhat commented Oct 5, 2016

I'm not sure if I should close this or not. It's really not a problem that can be addressed generically.

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