jasonphillips / draft-js-richbuttons-plugin

A plugin for adding rich formatting controls - https://jasonphillips.github.io/draft-js-richbuttons-plugin/
38 stars 14 forks source link

Allow custom styles and blocks #6

Closed theozaurus closed 6 years ago

theozaurus commented 8 years ago

It would be brilliant if inline styles and block types could be injected in so that React components which will just work are automatically generated for these additional styles and block types.

jasonphillips commented 8 years ago

Great idea. Once I have a moment to write in a new test case to cover this feature, as well as an update to the README, I'll be merging this in.

jasonphillips commented 7 years ago

I've been waiting off a bit on this idea to see how the plugins API settles in draft-js-plugins, which is still undergoing some revisions towards their full 2.0 release. I may check into it again very soon; I tried several variations on what you started in this PR, and some minor issues keep me from being able to commit to the approach, mainly concerning the way the plugins API currently works.

Radivarig commented 7 years ago

Looking forward to see this stable and merged.

jasonphillips commented 6 years ago

Thanks for the work here -- I have now published an update allowing for custom blocks and styles; see the updated demo & example code at /example/CustomBlocksAndStyles.js. In the end I took a slightly different approach from that submitted in this PR, but with the same general aim.

theozaurus commented 6 years ago

Brilliant. Thanks very much.