Looking forward to update the function。
I've started looking into implementing this, and DraftJS doesn't support indenting outside of lists:
Note that there is currently no support for handling depth for blocks of any type except 'ordered-list-item' and 'unordered-list-item'.
https://draftjs.org/docs/advanced-topics-nested-lists.html#content
One workaround I'm considering is inserting a series of   at the beginning of the line. That feels hacky, but I don't know much about DraftJS internals so I don't know if it's not supported because it's hard or if they just haven't implemented it yet.
In my opinion this can be done like I have done text alignment, by adding a block level metadata and then using it to style the block.
The inserting spaces approach I just tried is woefully insufficient.
It looks like a proper discussion of the issue is happening here: https://github.com/facebook/draft-js/issues/887.
Yep would be great to have block level inline styles.
@jpuri In the metadata approach, how does the metadata get used to apply a style? I see where it's added but not where you use it to apply a style.
has the indentation supported yet?
i still cannot use it on the demo page, work only on list .
Hi,
I am also curious about the current state. It seems that dpetraneks changes got merged, but I couldnt find any of his commits in the current master branch? By intention or did something go wrong?
Thanks
Sorry guys dpetraneks's changes have been merged but the release got delayed. Some of relates libs draftjs-to-html, html-to-draftjs. Are required to be updated for that. I will try to make it sooner.
Is it supported now?
Is it supported now?
Sorry guys dpetraneks's changes have been merged but the release got delayed. Some of relates libs
draftjs-to-html,html-to-draftjs. Are required to be updated for that. I will try to make it sooner.
Hi, any news about dynamic inline style changes approach? Like, if I need to change font-size from 10 to 200 - I really can't make too lot of combinations of predefined customStyleMaps.
Most helpful comment
Yep would be great to have block level inline styles.