News for hackers. Stuff that matters.
Re:Trix: A rich text editor for everyday writing by pbreit on Sunday October 18, 2015 @11:46PM (#10410993)
Please tell me this is a humane alternative to TinyMCE, CKEditor, etc?
Re:Trix: A rich text editor for everyday writing by smileysteve on Monday October 19, 2015 @12:07AM (#10411058)
Re:Trix: A rich text editor for everyday writing by voltagex_ on Monday October 19, 2015 @02:19AM (#10411406)
Okay, time to write up an article about all these different WYSIWYG editors.
Re:Trix: A rich text editor for everyday writing by petepete on Monday October 19, 2015 @11:01AM (#10413314)
Please include wysihtml5 on your list :)

http://xing.github.io/wysihtml5/

Re:Trix: A rich text editor for everyday writing by voltagex_ on Monday October 19, 2015 @05:15PM (#10415831)
Would you like to collaborate on an article?
Re:Trix: A rich text editor for everyday writing by petepete on Saturday October 31, 2015 @03:16PM (#10483771)
Sorry, I only just saw this message. I'd defintely offer to contribute if you're writing one alhough I'm not hugely familiar with many (but am with wysihtml5, quill and CKEditor).
Re:Trix: A rich text editor for everyday writing by mmahemoff on Monday October 19, 2015 @12:48AM (#10411180)
Going from the README, the main difference is the architecture.

It creates a layer of indirection between user actions and the DOM. This has two advantages:

* For developers of Trix itself, it eases the pain of cross-browser development - as the README says, contenteditable is inconsistent across browsers.

* For developers using Trix, you get a clean API (Trix.editor) so you can edit the document programmatically without your own cross-browser development.

Re:Trix: A rich text editor for everyday writing by room271 on Monday October 19, 2015 @03:48AM (#10411661)
'contenteditable is inconsistent across browsers'.

We (the Guardian) created Scribe to tackle this:

https://github.com/guardian/scribe

(I can't take any credit personally though alas!)

Re:Trix: A rich text editor for everyday writing by sstephenson on Monday October 19, 2015 @08:38AM (#10412458)
Sadly, while the Scribe developers correctly identified all the various problems with contenteditable (https://github.com/guardian/scribe/blob/master/BROWSERINCONS...), they chose to solve it like most other editors: by using execCommand, waiting for the browser to make a change, and then attempting to clean it up afterwards.

Trix's thesis is that this approach is fundamentally broken. Instead, Trix updates an internal document model on each input event, then re-renders the editor contents in response.

Re:Trix: A rich text editor for everyday writing by aleem on Monday October 19, 2015 @05:58PM (#10416099)
I tried Scribe and was quite enthused about it but there are trivial bugs that never got fixed, been a year since I filed this issue[1]:

Basically, http://jsfiddle.net/L59kL1rf/ -- you cannot delete the first paragraph and always end up with <p><br /></p> and if you try to delete that it just starts acting strange. This issue has been open since 2014 and it seems it's a bug in the core.

There were other similar issues I ran into around the same and decided I would revisit later but it's been a nearly a year since.

[1]: https://github.com/guardian/scribe/issues/300

Re:Trix: A rich text editor for everyday writing by twsted on Monday October 19, 2015 @08:58AM (#10412546)
We are using Scribe for our product and we are happy with it. It lacks some documentation but it's solid.