3 ms·
There's something that I really need to get off my chest and I looked for an occasion to vent my frustration for a while. I'm taking this occasion right now. I
by pothibo 12y ago
There's something that I really need to get off my chest and I looked for an occasion to vent my frustration for a while. I'm taking this occasion right now.
Instead of adding new APIs, is it possible to address the ENORMOUS elephant in the house: <textarea>'s API.
It's unusable. People have built workarounds for years and yet, nothing has changed. Here's a few things to get started:
- Autoresizing. CSS resize: auto; could work but I don't care how we do it.
- Styling content. So we can use it to build IDE. So something like iA's editor can be built.
- Tokenizer. This would help solve the above. Could be a strip down version of a HTMLElement. Or an approach like SVG. Anything. Lots of people have more experience than me on this matter. I'm sure some of you can come up with something.
- Better input management. So we can build IDE with auto-indent.
The web is so dynamic now, and all the editor out there are ugly hacks that are so hard to maintain. Anyone who's built an interface over textarea/contentEditable shares my pain.
If, for whatever reason, it's impossible to have a textarea fullfill this job, then can we at least get a decent contentEditable implementation. It's so broken. On so many level.
I love you all, and I appreciate all the hard work, but I hate textarea's dumb API.
- LukeB_UK 12y agoThere's no reason that this can't be addressed while adding new APIs. They're not mutually exclusive.
- deleted 12y ago[deleted]
- paulojreis 12y agoYes, it is very limited, indeed. However, W3C is not a single group. Specs are developed (and proposed) mostly by charters or separate working groups. They are developed without "strict" control by W3C. This means that there are lots of specs being built in parallel[1], which means that having people develop the Clipboard API standard won't imply less (or more) development on the textarea-related standard... [1] Some of them even collide, while others are designed to serve specific (corporative) interests.
- spankalee 12y agoThe current trend is to find and expose the low-level primitives that let developers build their own tags, so that instead of needing more features added to <textarea> you can build an element that does everything <textarea> does and more. Then you are not constrained by the W3C process or decisions. Web Components plus the Selection and Range APIs get you most of the way there for <textarea>. Unfortunately, I've found them to have different bugs in various browsers, probably because they're not used so much, but fixing these APIs opens up a lot more than just better <textarea>. https://developer.mozilla.org/en-US/docs/Web/API/Range https://developer.mozilla.org/en-US/docs/Web/API/Range https://developer.mozilla.org/en-US/docs/Web/API/Selection https://developer.mozilla.org/en-US/docs/Web/API/Selection Custom elements can't participate in <form>s easily yet, which should probably be fixed, but a lot of apps are skipping form submission for XHR calls anyway.
- deleted 12y ago[deleted]
- rmetzler 12y agoI wish I could mark something, hit " or ( and it would be in double quotes or enclosed in brackets like in any decent editor. My muscle memory fools me every time.