react-draft-wysiwyg
react-draft-wysiwyg copied to clipboard
Allow indenting text
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.
Still no news about this? ^^
@MamorukunBE do you know how to make it work on a list? It is meant to work on a list but don't see how. Thanks!
At my end, rendering customs blocks permitted me to indent text in <p> but also in <li>. Without the code in front of me (just woke up), when rendering a <li> ([un]ordered-list-item), I wrap its content into a indented span, as simple as that :)