visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
290 stars 46 forks source link

Editor - Multiple columns layouts #41

Closed adrian-moisa closed 2 years ago

adrian-moisa commented 2 years ago

Even if we don't display content as pages, the ability to select a section of the document and setup a multiple columns layout would be highly beneficial. Besides columns we can introduce in the future custom shapes or other grid types.

martin-spread

Join us on discord to get implementation advice and help or follow us on YouTube Visual Coding to learn more about the architecture of Visual Editor and other Flutter software architecture advice.

kairan77 commented 2 years ago

I figure this is probably not categorically and satisfactorily possible, table and column theoretically requires nested syntax such as xml, where as markdown and quills datastructure is strictly sequential (flat with no nestings), I don't know if I am making the point across, this would be difficult without some dirty hacks, not sure if it's worthwhile to deviate from the standard format of quill/markdown for this feature. think about what would you want to do with different formattings inside the column or table, and how about column within a column? if fully nested syntax should be supported why not ditch markdown/quill and go straight to xml instead.

adrian-moisa commented 2 years ago

@kairan77 You have some fair points here. I'll let that sink in and see what I can make out of it. If you have any links you can share on this topic I'd be happy to read further. Cheers!

adrian-moisa commented 2 years ago

Closed. In the meantime I gained more knowhow about the rendering logic of Quill/VE. I appears that implementing such a feature will require major overhaul of the rendering code for lines and blocks. Also for the one that computes selections. And furthermore for the code that handles virtual scrolling. Also it would be necessary to introduce the concept of pages. If not pages at least tables. And then again there's a log of work to be done there to improve the selection logic for tables. This is not by any measure an easy task. And the benefits are marginal since VE is built to handle Articles, not word docs or pdfs. Maybe we will return back to this task in the far future if we manage to grow as a company with suficient revenue to invest in such a task for our potential corporate clients. So far this is not realistic in the next 1-2 years.