I have very little experience with using ‘contenteditable’ in any way (Elm or otherwise) but at work we’re starting to consider using it more to provide ‘slicker’ interfaces. Mostly to allow users to enter text into boxes that will naturally expand with the content being written whether single line or multi-line.
When I google around I find bits of information from down the years but I’m finding it hard to get a clear idea of how best to use contenteditable.
My main question is quite basic: Can you use a ‘contenteditable’ div much like you use a standard input box or textarea? Are there particular things you need to work around? And if so, is it just a couple of things to bear in mind or do you end up having to write most of a text editor in order to cover the various edge cases or typical behaviours?
The last part is where i think I get confused as ‘contenteditable’ conversations often overlap with “I’m writing my own client side text editor” conversations. I’m not looking for an editor component or a ‘wysiwyg’ experience. I’m mostly just after slightly nicer and more flexible textarea/input box. Should I be considering ‘contenteditable’ or perhaps there are other approaches?