Live data from Hacker News

Editor.js – Block Styled Editor

editorjs.io

21–30 of 75 posts

Re: Editor.js – Block Styled Editor

#22
post #11

Why JSON-that-resembles-HTML rather than whitelisted-subset-of-HTML? Seems to throw away a huge amount of tooling and force an extra step on anything that wants to render the content? Although I guess I could render the JSON to HTML server-side and get the best of both worlds. Everything usually boils down to a question of caching something somewhere.

I think the idea is platform agnosticism. What if you're serving to a client that doesn't understand html? You'll need to interpret it somehow...

Re: Editor.js – Block Styled Editor

#24

Two long established predecessors to this: Sir Trevor JS[0] and Colonel Kurtz [1]. I've used Kurtz extensively and it's been brilliant. The only downside of all these block-based editors is that you can't easily create layouts where images float to the left or right of text. Well, you can create them but you don't get a WYSIWYG idea of what it looks like right in the editor. I can live with that! I've explored all so…

Maintainer of Colonel Kurtz here! It's super awesome to see positive feedback. Thank you!

CK is our workhorse for tons of sites, and we've struggled to come up with a good general pattern for editing horizontal layouts. We'd happily take suggestions, however. I'll admit it's one of the more awkward things with the editor.

Re: Editor.js – Block Styled Editor

#25
That pop-up when I click the 3 dots is way too slow, it's really annoying. Those buttons should probably be visible on hover.

Or better still, just show them on the side maybe. It takes too many clicks to get work done. (IMHO)

Re: Editor.js – Block Styled Editor

#26
post #25

That pop-up when I click the 3 dots is way too slow, it's really annoying. Those buttons should probably be visible on hover. Or better still, just show them on the side maybe. It takes too many clicks to get work done. (IMHO)

Heard you, thanks. Will work on this.

Re: Editor.js – Block Styled Editor

#27
Wagtail, a CMS system for Django uses a very similar abstraction to this for their StreamField[1] type and I've found it incredibly useful. It allows frontend services and backend services to easily implement custom types, and treats streams of content as a list of 'blocks'.

[1]: https://docs.wagtail.io/en/v2.4/topics/streamfield.html

Re: Editor.js – Block Styled Editor

#28
post #11

Why JSON-that-resembles-HTML rather than whitelisted-subset-of-HTML? Seems to throw away a huge amount of tooling and force an extra step on anything that wants to render the content? Although I guess I could render the JSON to HTML server-side and get the best of both worlds. Everything usually boils down to a question of caching something somewhere.

Every browser uses different markup to represent contents of contenteditable. One browser uses div for text and splits it into two when enter is pressed, other browser inserts
, next one has paragraph, etc. ect.

JSON is not here for resemblance, but for normalization. You force single presentation of things from start, and when user presses enter (or other text composition event happens) you prevent default action, update document model (JSON) and then update the HTML.

This approach is much more sane and predictable than trying to trust browser's HTML.

Re: Editor.js – Block Styled Editor

#29

Every time I see a new contenteditable-based editor I'm reminded of this https://medium.com/content-uneditable/contenteditable-the-go...

I read this! And then we decided that the right thing to do for MOBILE is to completely AVOID native selections. The editor we built is way more clean than ANYTHING professional companies like Froala, Imperavi, TinyMCE, CKEditor and others have put out. But only for mobile touchscreens.

We are thinking of hiring a manager to license this to everyone using the other editors on their site (sites like BuiltWith can tell you entire lists of these sites) or just negotiate to give an unlimited / open source license to Froala / Imperavi themselves!

See for yourself: https://youtu.be/-DgaTwG1csc

Contact greg at the domain qbix.com if interested. It would be a commission based job, but can involve a lot of fun things like producing videos and websites w our team.

Re: Editor.js – Block Styled Editor

#30
post #10
post #6

Earlier quoted context omitted.

Or slatejs. As I understand both have (or used to have) some serious problems with Android mobile. I don't see an explicit claim of Android/mobile support here either, which to me would be the killer feature.

They're hard at work on Android support on SlateJS. https://github.com/ianstormtaylor/slate/issues/2062

We just upgraded our Slate version, and the relatively new Android support is sort of working, but still with a lot of bizarre and janky behavior.
Post reply on HN