Scribe comes with a “sanitizer” plugin. See http://www.theguardian.com/info/developer-blog/2014/mar/20/i...
HN user
OliverJAsh
Just to clear up any confusion: this is not the same as the Guardian’s “Scribe” project (https://github.com/guardian/scribe). I believe Quill did used to be called Scribe, but they are not the same. (Similar in purpose - take your pick.)
We only save inline text in HTML. Text “elements” along with any other media “elements” is stored as JSON and we attach metadata to each element.
This could be helpful, although we haven’t needed this sort of facility yet luckily. Thanks for posting.
It’s easy enough to write a directive to plug Scribe in to Angular with bidirectional binding. I’ll post an example soon, but it’s simply a case of listening to content changes in Sribe and updating the Angular model using ng.NgModel.NgModelController.
Can you add an issue here (https://github.com/guardian/scribe/issues) and we can talk solutions? I have a few in mind!
Generally speaking, it should patch behaviour to the point where it doesn’t get in the way of the user and produces clean and semantic markup. We have found that patching some of the smaller behaviour obscurities would not be trivial. If it matters to the community though, we (the open source community) can definitely get them patched!
Nice! What persuaded you to write this polyfill?
I haven’t done any testing on mobile, but we could add a few platforms to our integration tests to see what the support is like, perhaps! It would be good to test.
The behaviour you describe around italics is completely native to the browser, so it will at least be consistent across uses of `contentEditable`. I agree that it is annoying, but there were much bigger fish to fry (https://github.com/guardian/scribe/blob/87d3ed1a7f28d9fcdcc0...).
You make some very good points about Markdown, and we spent awhile thinking about whether to go down that road or not. Although there is a technical barrier to access for Markdown, that’s not the reason we decided against it. Maybe we should do another blog post to follow up with more details regarding our decisions. (Or, I’ll come here with more details in just a bit.)
I should’ve added that! There are many…
The distribution files are kept in the `dist` branch. The tree you linked to is just for the example. We encourage consumers to download these files using Bower (`bower install scribe`)
Google Reader + Twitter = http://vimeo.com/69376016
Thanks. I'll take both of those into account :-)
Thank you! And yes, that's right.
I didn't use Bootstrap, but I quite clearly took a lot of inspiration from Twitter.