https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/contentEditable … but there are limitations and sharp edges
-
-
-
- Još 5 drugih odgovora
Novi razgovor -
-
-
I’ve just started reading the docs but
@ProseMirror might be good to check out -
Love
@ProseMirror have used in past
Kraj razgovora
Novi razgovor -
-
-
This is probably even worse than contentEditable, but how about this absolute positioning hack over top of a regular textarea? https://codepen.io/alexanderbird/pen/vYEqJyV … I'm imagining `--width` is set with JavaScript based on the actual content length.pic.twitter.com/6mv8aR0Juh
-
Love the spirit of this.
Kraj razgovora
Novi razgovor -
-
-
Not with a textarea, would have to roll your own. Could use contenteditable spans and capture the content but Implemented inconsistently across browsers iirc. Will the content inside always be plain text? Or rich text?
- Kraj razgovora
Novi razgovor -
-
-
Content editable is your only option. If it’s just plain text, it’s not so bad. You’ll want to build it out with vanilla js and create a React component to wrap it. The most annoying part is removing images and formatting when someone pastes text into it.
-
Yeah, realized wouldnt be so bad with just plaintext and firing event on blur. My nightmares with contenteditable were from trying to build the whole rich text of Roam in it, this is much simpler problem though, requires less control.
Kraj razgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.