News for hackers. Stuff that matters.
Re:Building a Text Editor for a Digital-First Newsroom by manigandham on Thursday April 12, 2018 @03:30PM (#16824145)
Cool, but it's yet another case of re-engineering the same thing. (edit: its not entirely new).

Splitting editors into an abstracted structure for finer control over data and presentation is something that's been done for a decade now in various text editors. Medium and Basecamp started similar projects and there's Mobiledoc which is trying to standardize the format. It'd be nice if all this effort focused on a single project so we could all just get a decent editor instead of different versions with various states of functionality.

FYI, my running list of editors: https://gist.github.com/manigandham/65543a0bc2bf7006a487

Re:Building a Text Editor for a Digital-First Newsroom by lambda on Thursday April 12, 2018 @03:44PM (#16824263)
This is discussing one that you already had on your list; ProseMirror. In fact, you've had it on the list since 2015: https://gist.github.com/manigandham/65543a0bc2bf7006a487/429...

This is talking about using ProseMirror to build some more features into their CMS, but it sounds like more of just a use of ProseMirror rather than a new editor entirely.

Re:Building a Text Editor for a Digital-First Newsroom by zokier on Thursday April 12, 2018 @03:43PM (#16824257)
Considering that they have built it on top of ProseMirror makes it seem pretty reasonable approach in terms of "reinventing the wheel"
Re:Building a Text Editor for a Digital-First Newsroom by zawerf on Thursday April 12, 2018 @08:18PM (#16826095)
It might be helpful to update your list with some feature comparisons. For example:

Quill vs (CKEditor and TinyMCE, Draft, ProseMirror, Trix): https://quilljs.com/guides/comparison-with-other-rich-text-e...

Slate vs (Draft, ProseMirror, Quill): https://github.com/ianstormtaylor/slate#why

I personally went with Slate because I needed first-class React support but not as low level as Draft.

Re:Building a Text Editor for a Digital-First Newsroom by philcockfield on Thursday April 12, 2018 @10:27PM (#16826715)
I really like Slate....but the ability to do collaborative editing is relatively new.

Have you done anything with collaborative editing with Slate? If so, how are you finding it?

Re:Building a Text Editor for a Digital-First Newsroom by zawerf on Friday April 13, 2018 @12:02AM (#16827051)
Collaboration isn't a requirement for me. I would definitely go with quill instead if it were. They put a lot of thought into making the delta format natural for operational transforms: https://quilljs.com/docs/delta/

Your document state is always represented by a list of deltas. Two people trying to change the same document would just have their individual list of ops "rebased" together using OT before being concatenated into the existing list of ops, forming a new document that is still just a list of ops.

Re:Building a Text Editor for a Digital-First Newsroom by parthdesai on Friday April 13, 2018 @12:13AM (#16827085)
I second using quill. It's really modular and the code itself is so clean.
Re:Building a Text Editor for a Digital-First Newsroom by unhammer on Friday April 13, 2018 @03:34AM (#16827835)
Quill has a great API, it seems like they really thought things through and designed it (what's a good word for the opposite of ad-hoc?). Even the lower-level bits are available with a clean API if you should ever need them (e.g. it's super simple to use the underlying OT and diff/merge functions on whatever text you want)
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.
Re:Building a Text Editor for a Digital-First Newsroom by pier25 on Thursday April 19, 2018 @06:37PM (#16880784)
Mobiledoc document format, while abstracted, is heavily based on html. ProseMirror completely abstracts content from prsentation.
Re:Building a Text Editor for a Digital-First Newsroom by salatschussel on Friday April 13, 2018 @12:52AM (#16827200)
> Splitting editors into an abstracted structure for finer control over data and presentation is something that's been done for a decade now in various text editors.

Sounds like Latex which has been around much longer.

Re:Building a Text Editor for a Digital-First Newsroom by bm1362 on Friday April 13, 2018 @03:10AM (#16827723)
Is there a web-based WYSIWYG editor?
Re:Building a Text Editor for a Digital-First Newsroom by zaarn on Friday April 13, 2018 @03:35AM (#16827841)
Overleaf and Sharelatex have WYSIWYG Editors for latex, yes.
Re:Building a Text Editor for a Digital-First Newsroom by inkubux on Friday April 13, 2018 @05:56AM (#16828447)
There Is also Slatejs. We use it at work and it's really great.

https://github.com/ianstormtaylor/slate