Search
HTML Attribute to Allow/Disallow Handwriting Input
12.8.2024
A new explainer for a new HTML attribute to handle handwritten inputs. Like this:
<input type="text" handwriting="true" ... <input type="text" handwriting="false" ... <textarea handwriting="" ... <!-- evaluates to "true" --<div contenteditable...
AutoGrow Textareas with CSS
18.12.2023
As the demands of the web change and developers experiment with different user experiences, the need for more native language improvements expands. Our presentation layer, CSS, has done incredibly well in improving capabilities, even if sometimes too slow. The need for native support...
Creating an Editable Textarea That Supports Syntax-Highlighted Code
16.4.2021
When I was working on a project that needed an editor component for source code, I really wanted a way to have that editor highlight the syntax its typed. There are projects like this, like CodeMirror, Ace, and …
The post Creating an Editable Textarea That Supports Syntax-Highlighted Code...
The Cleanest Trick for Autogrowing Textareas
11.11.2020
Earlier this year I wrote a bit about autogrowing textareas and inputs. The idea was to make a <textarea> more like a <div> so it expands in height as much as it needs to in order to contain the current value. It’s almost weird there isn’t a simple native solution...
Auto-Growing Inputs & Textareas
25.3.2020
By default, <input> and <textarea> elements don't change size based on the content they contain. In fact, there isn't any simple HTML or CSS way to make them do that. Kinda funny, as that seems like a reasonable use-case. But of course, there are ways, my friend. There are always...
“resize: none;” on textareas is bad UX
30.1.2020
Catalin Rosu:
Sometimes you need to type a long reply that consists of many paragraphs and wrapping that text within a tiny textarea box makes it hard to understand and to follow as you type. There were many times when I had to write that text within Notepad++ for example and then just paste...
The Browser Can Remember Edited Content
22.5.2019
You can make the text inside any HTML element editable by adding the contenteditable attribute.
<div contenteditable>
Hey, I'm like a textarea kinda now!
</div>
I wouldn't say there are wheelbarrows full of use-cases for that, but it's neat. One possible use might be...
Everything You Ever Wanted to Know About inputmode
17.5.2019
The inputmode global attribute provides a hint to browsers for devices with onscreen keyboards to help them decide which keyboard to display when a user has selected any input or textarea element.
<input type="text" inputmode="" />
<textarea inputmode="" />
Unlike changing the type...