top | item 28005375

(no title)

Kappa90 | 4 years ago

Have been building https://saga.so with Slate for the last 12 months.

Can confirm it was a bumpy ride, but it also gave back a lot. The main reasons for using Slate over Prosemirror were the almost complete API for managing and editing a block based page, and the fact that it's written in Typescript (although partial types support is a recent addition).

We still have quite a few Slate-related bugs, and the size of our extension code to cover for slate bugs/omissions or to extend the behavior in general is now many thousands of lines long, but wouldn't have chosen anything else.

We tried Prosemirror at the beginning and it was very hard to get into. We checked again when TipTap came out (which is a wrapper of Prosemirror), but all our advanced custom logics would have had to be rewritten in Prosemirror so we abandoned the idea very easily. But we support the team behind Tiptap on another open source project, Hocuspocus, which is a client/server wrapper for Yjs, a library for collaboration with a focus on text editors.

In the end, I have PTSD from Slate, but also, we couldn't have done it without it, so thanks Ian if you're reading this!

https://tiptap.dev

https://hocuspocus.dev

https://yjs.dev

* my first comment on HN after years of lurking!

discuss

order

holler|4 years ago

> and the size of our extension code to cover for slate bugs/omissions or to extend the behavior in general is now many thousands of lines long

yikes, but if it's working now then just tech debt for the future.

I initially investigated using slate.js, prosemirror, and draft.js for my project https://sqwok.im but ended up writing my own parser instead, learning quite a bit about such fun api's as browser Range(), and the many pitfalls of cross-browser compatibility. It was laborious but got it to a place I'm happy with.

Congrats on Saga! It looks like something I might use and I dig the UI.

Kappa90|4 years ago

I know it sounds like tech debt...and it is. But we're to a point where we could potentially be able to integrate those extensions back into the core library and our slate-saga, so it's eventually paying back.

We really needed extensive text manipulation, so starting from Slate gave us a considerable initial boost, but congrats on building your own parser!

Congrats to you and if you try out Saga, let us know about it :)

pembrook|4 years ago

Curious if you looked into Editor.js at all when building?

Im in the middle of sizing up text editors myself, seems like editor.js would require less work, but wondering if I’m missing any red flags and should go with Slate or tiptap (prosemirror) instead.

At some point down the road I’d love to implement collaborative editing.

Kappa90|4 years ago

We did look into editor.js and the API seems not as advanced as Slate's, mostly because Slate tries to replicate the DOM's behavior with Nodes and Ranges, so you can make edits in a very fine grained way.

If you're going for a new text editor, I'd start with Tiptap and try to check how to do advanced custom stuff with Prosemirror. Maybe if Tiptap 2 was out a year ago, we would have started with that.

For collaborative editing, definitely check out https://yjs.dev

kiliancs|4 years ago

Very cool project. Thanks for sharing.