3 ms·
It's been a few years since I worked on Draft, but can't you just define a custom block style to implement alignment?
by underwater 10y ago
It's been a few years since I worked on Draft, but can't you just define a custom block style to implement alignment?
- Ronsenshi 10y agoIf you mean Block Styling like here: https://draftjs.org/docs/advanced-topics-block-styling.html#content https://draftjs.org/docs/advanced-topics-block-styling.html#... Than yes - that is certainly a one way to handle it. However this approach would apply a some alignment-related CSS class instead of applying style to the block itself. Here's what Draft.js would return: `<p class="align-right">Text Text Text</p>` I would prefer if it was: `<p style="text-align:right;">Text Text Text</p>`