Live data from Hacker News

Pell – A simple and small rich-text editor for the web

github.com

51–60 of 106 posts

Re: Pell – A simple and small rich-text editor for the web

#51
post #11

I actually started a simple WYSIWYG editor that doesn't use contentEditable but instead a tiny subset of HTML and some virtual DOM like technology. Thanks for this post. It makes me want to work more on it!

I would be very interested in seeing that!

Re: Pell – A simple and small rich-text editor for the web

#52
post #47
post #42

Earlier quoted context omitted.

Accurately rendering text in an WYSIWYG HTML editor has equivalent difficulty to implementing the engine used in the web browser that will eventually be used to render that HTML, otherwise it can never truly be WYSIWYG

That's fair, I'm obviously biased by my general loathing of WYSIWYG editors but clearly I'm in the minority here. I guess when I think about text editors I think mainly of code editors.

I bet you like your syntax highlighted though

Re: Pell – A simple and small rich-text editor for the web

#53

This is cool :) That said (and not to take thunder away from your page), this is possible because the HTML spec itself allows for any element to be made into a "WYSIWYG" editor by adding the "contenteditable" attribute. What most other larger editors are doing is working around some of the horrendous non-standardized versions of execCommand which varies across browsers. Ideally a web standards body should come out wi…

>

IF this ever came about (big if) it should support native conversion between markdown / html and other formats. That stuff is a nightmare

Re: Pell – A simple and small rich-text editor for the web

#54
post #41
post #37

Earlier quoted context omitted.

I doubt this? contenteditable is pretty stable in Chrome/WebKit.

I don't know - you tell me. Anyway we had our share of trouble with a customer due to an exotic rendering issue that occurred in two consecutive versions of Chrome and then disappeared, so yeah.

Sure, but that happens. We hit an insane performance problem related to Chrome and some weird combination of CSS that disappeared in a similar number of versions.

I'd say it's the exception and not the rule, though.

Re: Pell – A simple and small rich-text editor for the web

#55

As another alternative, I used SimpleMDE ( https://simplemde.com/ ) for IPFessay ( https://gitlab.com/stavros/IPFessay ), and, while not this light, it's pretty good and featureful. It doesn't expose all the features I'd like it to expose, but I'm quite satisfied by it.

SimpleMDE looks great!

Re: Pell – A simple and small rich-text editor for the web

#56

This is cool :) That said (and not to take thunder away from your page), this is possible because the HTML spec itself allows for any element to be made into a "WYSIWYG" editor by adding the "contenteditable" attribute. What most other larger editors are doing is working around some of the horrendous non-standardized versions of execCommand which varies across browsers. Ideally a web standards body should come out wi…

> IF this ever came about (big if) it should support native conversion between markdown / html and other formats. That stuff is a nightmare

I've never seen two Markdown implementations that do exactly the same thing, unfortunately... even with so-called CommonMark implementations.

Re: Pell – A simple and small rich-text editor for the web

#57
post #38

Earlier quoted context omitted.

Which means you end up shipping a huge chunk of "bloat" to your end users - it may be a library or "runtime" rather than your own code, but it adds up to the same thing.

so in that case isn't it a good idea to try and reduce your overheads wherever possible? And in the case of windows store apps, the runtime is already on the users systems and they're just downloading the packaged JS/HTML

> so in that case isn't it a good idea to try and reduce your overheads wherever possible?

I think it's the opposite: if you're using react-native or electron you might as well give up on optimizing the size of your own code, because it's not going to make a dent in your overall level of bloat. Enabling your codebase to be used from the user's own browser would have a much better return in bloat-reduction, even if it meant writing more of your own code.

> And in the case of windows store apps, the runtime is already on the users systems and they're just downloading the packaged JS/HTML

Sure, but making your site windows-store-only is morally the same thing as making it single-browser (possibly even single-version-of-that-browser). The flip side of "all that "bloat" is there so that you'll get consistent results across browsers" is that you can cut a lot of bloat if you're willing to sacrifice crossplatform support.

Re: Pell – A simple and small rich-text editor for the web

#58

It's great that it's small, but it suffers from the same horrible interactions that most other web editors also suffer from. Try quoting the last paragraph in the editor. It's now impossible to ever escape from the quote. All new text at the bottom stays "quoted". From a cursory test of the editor, it suffers from basically all the issues that contenteditable suffers from. The reason other editors are so big is becau…

Works for me in Chrome 60. Just return twice, like a normal editor.

Re: Pell – A simple and small rich-text editor for the web

#59
Hi everyone, author of pell.js here, thanks for all the positive AND critical feedback. Hey, this is Hacker News, how boring would it be if everyone's comment was just "Cool" or "Good job"? I love hearing the gripes and individualized complaints of smart people that have worked on similar (and much larger) projects.

I'd like to mention a few things about pell.js and it's goals:

- It was not made to be the most full-featured editor out there

- It was not made to fight with or worry about browser inconsistencies (browsers are converging, quickly too)

- It was made to demonstrate the underlying simplicity of something that looks like magic to most beginner developers (including myself) and to teach people how to use `contentEditable` and `execCommand` via a tiny, extremely readable codebase

- It was made for people who need just a basic WYSIWYG editor in their app/site/whatever and who care about bundle size (PWA's anyone?)

Over time, many of the inconsistencies and issues will get fixed or implemented in pell, but the goal of remaining tiny yet functional will always remain paramount.

Re: Pell – A simple and small rich-text editor for the web

#60

I am impressed by both the size and the features and no dependencies. Kinda like a gui linux under 20 MB. People need to do such similar things instead of a huge bloated single page web app with features that nobody want. Great project.

Sorry but it’s just using the standard contenteditable attribute, which works terribly, see https://medium.engineering/why-contenteditable-is-terrible-1...
Post reply on HN