draft-js-utils icon indicating copy to clipboard operation
draft-js-utils copied to clipboard

Add support for overriding block element using blockStyleFn

Open filipengberg opened this issue 8 years ago • 1 comments

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!

filipengberg avatar Oct 31 '17 11:10 filipengberg

Hi @sstur, is there work needed to be done before this MR is merged? Really interested in this.

Thanks.

ochicf avatar Apr 14 '21 09:04 ochicf