News for hackers. Stuff that matters.
Re:Slate JS – A customizable framework for building rich tex... by far34 on Thursday November 15, 2018 @02:27AM (#18457512)
What format is content stored in? Is it all RTF under the hood or something else more custom? Curious to know.

Also what's the difference between using SlateJS vs. say Monaco editor which powers VSCode?

Re:Slate JS – A customizable framework for building rich tex... by dumbfoundded on Thursday November 15, 2018 @02:35AM (#18457552)
The whole point of slate is an immutable representation of a document. Without getting too much in the weeds, a document is an immutable object. Edits to the document are transforms. The obvious benefit is undo/redo is pretty simple. The more subtle benefit is that really complicated document rules become tractable. I built temi.com using this (https://www.temi.com/good-audio-quality). One feature that Slate enables pretty easily is incremental saves. Since the object is immutable, you can pass changes to the server instead of the entire document by just checking element ids. You can get multi-person edits relatively easily as well.
Re:Slate JS – A customizable framework for building rich tex... by arsalanb on Thursday November 15, 2018 @02:30AM (#18457524)
Stored as a series of operational transformations, I think.

This site helps understand it — https://operational-transformation.github.io/

Re:Slate JS – A customizable framework for building rich tex... by paperpunk on Thursday November 15, 2018 @02:31AM (#18457535)
You define an internal schema, which is essentially just a tree structure according to your own use-case. In this way it lets you do editing of more complicated page elements than a typical WYSWYG editor.

You can provide (or use others') serialisers and deserialisers to convert between that representation and something else, e.g. RTF, HTML.

Re:Slate JS – A customizable framework for building rich tex... by molikto on Thursday November 15, 2018 @02:28AM (#18457519)
monaco is not a rich text editor