What is the computational complexity of inserting a character into a text containing N characters, using this editor?
Trix: A rich text editor for everyday writing
71–80 of 137 posts
Re: Trix: A rich text editor for everyday writing
#72Re: Trix: A rich text editor for everyday writing
#73What would be useful though, would be an editor that supported "design" and not just text.
Re: Trix: A rich text editor for everyday writing
#74Re: Trix: A rich text editor for everyday writing
#75There is https://github.com/souporserious/react-trix but it looks like it does nothing at the moment.
Re: Trix: A rich text editor for everyday writing
#76I don't get these simplistic editors. You just have to learn ten HTML tags to do the formatting these editors offer. What would be useful though, would be an editor that supported "design" and not just text.
Re: Trix: A rich text editor for everyday writing
#77Nice to see this particular bit of info high up in the README (though "as seen in Basecamp 3" would fit well in the Github repo description line): > Trix is an open-source project from Basecamp, the creators of Ruby on Rails. Millions of people trust their text to Basecamp, and we built Trix to give them the best possible editing experience. See Trix in action in the all-new Basecamp 3. Nothing gets me more intereste…
Re: Trix: A rich text editor for everyday writing
#78I don't get these simplistic editors. You just have to learn ten HTML tags to do the formatting these editors offer. What would be useful though, would be an editor that supported "design" and not just text.
It may be used by people that don't even know what HTML is. Good luck teaching them what a tag is.
Re: Trix: A rich text editor for everyday writing
#79What is the computational complexity of inserting a character into a text containing N characters, using this editor?
However, the more tags you add to contenteditable elements (i.e. for formatting) the more work the browser has to do every time there's a page reflow and there will be a reflow every time the text changes. So the more formatting, the slower (less responsive) it will be.
The workaround for this (no idea if it's used in this editor) is to divide the document up into lots of individual elements with contenteditable=true and make sure that all outside-the-view elements are removed or at least hidden via 'display: none' and merely re-show them on-the-fly as the user moves about the page. Keeping a page or two above and below the view pre-rendered can help with responsiveness and you'd also have to make sure to pre-fill all the document's unseen space with whitespace so that the user can scroll to any position accurately even if the browser is still retrieving and rendering that portion of the document.
I came very close to implementing such a solution but ultimately decided on something else entirely (server-side rendering and a difference-based terminal update protocol). It's a great idea for an editor and tows the line of, "what we're supposed to be doing" on the web but ultimately it requires a lot of complicated code. Far more complicated that one would think at first glance.
Re: Trix: A rich text editor for everyday writing
#80I don't get these simplistic editors. You just have to learn ten HTML tags to do the formatting these editors offer. What would be useful though, would be an editor that supported "design" and not just text.