Closed JMA12 closed 5 years ago
@JMA12 I couldn't figure out how to do this. I spent a day trying to do this as well. I think the reason you may not be able to to it is because this library applies styles inline, and aligning texts needs to be placed on the block level. To me it doesn't look like this applies styles to a block. Luckily Draft JS does do block styling! (https://draftjs.org/docs/advanced-topics-block-styling).
Hope that helps!
I haven't used this in a very very long time, if I remember correctly @steveostudios is right, you need to style blocks using the blockStyleFn
Thanks @steveostudios and @webdeveloperpr
Already found the solution using toggleBlockType function from RichUtils.
Can this be used for alignment of selected texts?