4 ms·
Speaking as someone who has just implemented a similar editor (but only dependent on jQuery) this editor has serious problems. To begin with, the UI does not re
by podperson 14y ago
Speaking as someone who has just implemented a similar editor (but only dependent on jQuery) this editor has serious problems. To begin with, the UI does not respond to the selection (what will the bold button do given the current selection?) and using contentEditable DIVs will make 508 compliance horrendous (the selection is lost when a label gains focus). (Our editor allows either divs or iframes, but the latter is pretty much required for solid usability, unfortunately).
The magic is all in execCommand, but you also need to be aware of cross browser issues and execCommand's limitations (e.g. IE won't style using CSS which is a huge pain. ExecCommand can toggle bold but not background color). In the end we use execCommand to create spans and then style the spans.
Nice support for touch styling, speech input, mobile cameras, and dropping images though.
- eksith 14y agoYou sound like you know your stuff. This is kinda how I felt too; a small addendum, less is often a good thing, but least is not better. I hope the glitches will get ironed out and will apply to textareas too though. I certainly would rather send a much smaller JS file, especially for mobile users. Is your editor open source? Any chance you would be willing to share an example as well?
- podperson 14y agoWe plan to open source our editor but it's up to the client (who is amenable, just hasn't gone through procedure). Our editor is far more functional, 508 compliant, will be IE8 compatible (argh), and weighs in at about 800loc. I wrote it rather than use something off the shelf because none of the popular choices have well-behaved UIs.
- kemayo 14y agoThey got around the IE stuff by saying "Requires a modern browser (tested in Chrome 26, Firefox 19, Safari 6)". This is, of course, a synonym for "don't bother to use me in anything but hobby projects". (Or stuff which is completely mobile-focused, I suppose.)
- eksith 14y agoThis is the one thing, I wish more people would avoid doing. The fact of the matter is that most people use the browser their computer came with. Getting people to change that is tantamount to saying, we don't need to you as a customer. FWIW, it does work OK so far on IE10 for me.
- kemayo 14y agoIE10 is pretty solid. I only wish that I could get away with supporting just it, instead of IE8+.
- eksith 14y agoNot gonna be that easy at least for another couple of years. ;) I will say, most of my stats for clients show some IE10, more IE9 and fewer IE8 these days; about 5%/65%/20% split for IE versions with 10% for older ( IE/other browsers split at about 60%/40% ), and these aren't techy sites either. So there's some good news there. IE9 Isn't too bad actually, though sadly, a lot of eye-candy projects featured on HN break outright on it or are prevented from loading upon browser detection.
- kemayo 14y agoBiggest site I've got access to analytics on gets me 10/9/8 at 18%/56%/19%. So, someday!
- dspillett 14y ago> Getting people to change that is tantamount to saying, we don't need to you as a customer. In many cases supporting legacy IE is more hassle than it is worth, so people genuinely don't need IE8 users as customers. Unfortunately IE8 came with Widnows 7 so is supported as long as that is which IIRC is until 2020 (for the extended support period). Given how long it took out corporate clients to upgrade from IE6 to IE8 (some only just have) if I don't change jobs I'm going to be supporting IE8 in our applications for the next seven years at least, but many people do have the luxury of being able to say "sorry, I don't have time to be supporting that" especially when they are giving their time/effort for no financial (or similar) gain (I'm at least paid to deal with legacy IE!).