sstur / react-rte

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

Why are we limited to only using a group of buttons one time? #315

Open strongui opened 5 years ago

strongui commented 5 years ago

The way the code is written, in your toolbarConfig, you can only have one group of BLOCK_TYPE_DROPDOWN, for example. Which means you cannot have a drop-down of sizes and a drop-down of font styles for example.

The issue is here: https://github.com/sstur/react-rte/blob/f10c0e5b416c2bf5d0c3b76bbf970abb49f975fa/src/lib/EditorToolbar.js#L75

Perhaps the toobarConfig should be an array of objects instead of an object, so that multiple group types can be used in the same toolbar.