News for hackers. Stuff that matters.
Re:Building a Text Editor for a Digital-First Newsroom by z3t4 on Friday April 13, 2018 @02:45AM (#16827619)
Going with your own format has some advantages, but using a well known popular format also has advantages. I did look into ProseMirrors and other editors but due to the formatting I ended up making my own. Where I've gone the painful route of having HTML nodes instead of a JSON tree. My reasoning is that I always want to end up with HTML anyway, and this also allows switching back and forth between editing HTML and WYSIWYG-mode. And use existing source control (Git/Mercurial) for versioning. The biggest pain is that browsers like to mess with the white space, and different browsers want to format the HTML in their own way. The next step would be to implement my own html/CSS renderer/wysiwyg-editor using the canvas. When researching I found some proprietary tools that did that. I wish the contentEditable would get more love from the browser vendors, because that's what most web editors use.
Re:Building a Text Editor for a Digital-First Newsroom by manigandham on Friday April 13, 2018 @07:56AM (#16829095)
If you're looking for a traditional editor then Froala is worth every penny. It has 10x the features of all these more modern versions and still outputs solid HTML.