sstur / react-rte

Pure React rich text WYSIWYG editor based on draft-js.
https://react-rte.org
ISC License
2.86k stars 430 forks source link

Table support #52

Open Predjo opened 8 years ago

Predjo commented 8 years ago

Are there any plans for adding a table support?

sstur commented 8 years ago

Not at this time. The draft-js framework. on which this is built, is not well suited for editable tables. This is mostly due to the "flat" structure of the data model. There is some ongoing discussion of a new tree-based data model that supports arbitrarily nested structures (like a table cell with a paragraph inside or another table inside). This would make it possible to support much richer levels of editing.

Within the current constraints I've heard some suggestions about inserting tables as a sort of "foreign object" almost like embedding a spreadsheet. This would expose a limited set of features, maybe plain text in each cell without any ability to nest tables. As a side effect you wouldn't be able to create a text selection that crosses table or cell boundaries. But it would be much easier to implement. Similar to how they do in Quip.

This is probably not going to materialize in the short term.

sstur commented 8 years ago

This is currently not on my roadmap (especially until draft-js has this functionality). Closing for now.

raliste commented 7 years ago

What about today?

faddah commented 6 years ago

Could this please be re-opened and re-examined? it's now a year and a half later, can we see if draft.js has tables, and therefore, your react-rte can have tables, please? we have an education sector client we're building a large enterprise app for and implementing tables is one of their biggest requests.

thank you in advance for your consideration and prompt response to this.

best,

— faddah portland, oregon, u.s.a.

sstur commented 6 years ago

Hey Faddah. Sorry to say but this project is terribly unmaintained at this time. I'll re-open, but unless you or someone wants to contribute, this is unlikely to happen.

faddah commented 6 years ago

Thank you, @sstur — i have noticed that other projects like yours that derive from facebook/react's draft.js have implemented tables using the draft.js plugin architecture, like draft-wysiwyg — see https://www.npmjs.com/package/draft-wysiwyg & https://github.com/bkniffler/draft-wysiwyg/ & https://draft-wysiwyg.herokuapp.com/. perhaps you could implement the same? Just a suggestion. Thank you for your prompt response & re-opening this.

best,

— faddah