top | item 34848009

(no title)

justsomeuser | 3 years ago

I like the way you use a combination of <textarea> for editing and <pre> for DOM elements.

I actually have come to the same solution for a transcription web app.

I have found that <textarea> manipulation from JS is not really possible without `Document.execCommand` which is deprecated. Some edits will clear the undo history.

Do you have any notes you can share?

discuss

order

keizo|3 years ago

Yeah definitely seeing how far I can push textarea! Not sure it’s smart and the one issue I haven’t solved is the block indents on editing. But it’s ok. Still have the occasional or semi frequent rendering error when tags interfere. Hoping to stay away from content editable and any complicated editors. I use js to measure the width of spaces to set up pre so the two layers line up.