draft-js-utils
draft-js-utils copied to clipboard
Add support for overriding block element using blockStyleFn
This pull request adds the possibility to override the rendered block element using blockStyleFn. This functionality is currently supported in inlineStyleFn so seems fitting that it can be done in blockStyleFn as well.
It is currently possible to override the block tag using a custom blockRenderer. The problem is that using a blockRenderer causes the conversion to skip renderBlockContent which does a lot of good stuff. When all you want is to modify the block element but keep the default blockRenderer, this functionality comes in handy!
Hi @sstur, is there work needed to be done before this MR is merged? Really interested in this.
Thanks.