3 ms·
Nice. I recently wrote a custom contenteditable component/parser used for chat and elsewhere in https://sqwok.im https://sqwok.im and ran into a bunch of the sa
by holler 5y ago
Nice. I recently wrote a custom contenteditable component/parser used for chat and elsewhere in https://sqwok.im https://sqwok.im and ran into a bunch of the same issues.
I ended up switching everything to use regex with rigorous testing as there were far too many edge cases, particularly between the different browsers.
I agree contenteditable leaves a lot to be desired, and indeed I had to file a few bug reports to the vendors while working on it (e.g. in firefox hitting backspace against a <contenteditable=false> within a <contenteditable=true> wouldn't work)
Have you run into some of these cross-browser issues? How have you approached it?
off-topic: what do you like about closurescript?
- busymom0 5y ago> <contenteditable=false> within a <contenteditable=true> wouldn't work yep, ran into the same bug few months ago myself.
- askonomm 5y agoHonestly, I haven't even gotten into the cross-browser testing parts of this endeavour yet and what you write about frightens me hehe. But, since the project I am working on that has this is entirely open source, I figure if someone really wants rigid support for X browser, perhaps they can contribute. I usually build my OSS projects for myself, and share it only because why-not and perhaps someone can learn something from my projects. As for ClojureScript, well, I just find it a lot more concise and easier to read than a non-lisp. I realise this is not the case for someone who has never seen Lisp before, but from my experience, people who do learn how to read a Lisp tend to also see that point of view of it being highly effective at conveying meaning. I just feel like there's less cognitive overload with it. I still make money writing plain old JavaScript, Java, PHP and other C-derivatives, but for personal use Clojure is my go-to.