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

Textarea as container #140

Closed
levint opened this issue Jul 2, 2012 · 4 comments
Closed

Textarea as container #140

levint opened this issue Jul 2, 2012 · 4 comments
Milestone

Comments

@levint
Copy link

levint commented Jul 2, 2012

I wish there would be support for form textarea as a container. It should also degrade gracefully into a normal textarea if ever javascript is disabled. Is this possible?

@OscarGodson
Copy link
Owner

To help best answer your question, why do you want it to be a textarea and not a contenteditable iframe?

JavaScript is enabled on some ~95% of devices. I'm curious who and what is your use case? This will help me figure out how to help or what to change.

@levint
Copy link
Author

levint commented Jul 2, 2012

Thank you for your fast reply :)

My app (personal project) is a Q&A site similar to stackoverflow (ask questions, answer questions) so the primary method of posting content is through html forms. I want the basic features above to work without javascript just in case there are users who browse with javascript disabled.

@OscarGodson
Copy link
Owner

This isn't a textarea because you wouldn't be able to do anything neat with a textarea. We're working on cool editing features like what Mou or Byword does. That'd be impossible with a textarea. However, you still need to get content out and that's why the API is there.

You can sync up the changes you make with a textarea super easy so when a form is submitted it'll work like this:
http://jsbin.com/etudol/edit#javascript,html

Type in the editor and you'll see the textarea sync up the content. Obviously, you'd hide the textarea (display: none) on your site. You could check if JS is disabled and if it is you could not hide the textarea so people could type in the textarea directly.

Also, side note, I really wouldn't worry about people with JS disabled. Only ~2% of the US don't have it enabled and that's the highest in the world (see: http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/ ) No one disables it anymore because if they did almost all sites would break on them. Worrying about JS disabled people is like worrying for IE5.5 or 4 users ;)

Does that answer all your questions?

Dupe of: #107

@levint
Copy link
Author

levint commented Jul 2, 2012

Thank you for the clarification :) Yes indeed you are correct that we should not worry about javascript being disabled since almost all users have it enabled. I'd take your suggestion regarding synchronization with a hidden textarea.

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

2 participants