Text Alignment Feature
See original GitHub issueThis has been requested several times, and also has been a source of confusion. Basically at the moment the alignment plugin works solely with atomic blocks. This isn’t clear from the docs or examples and it absolutely makes sense to implement this feature. Therefore to fix this we need to enable text alignment and make it clear in the docs that the alignment plugin also works with atomic blocks and that they’re treated differently
- Make clear in the docs that block alignment and text alignment is separate.
- Add Text alignment buttons to draft-js-buttons for
left
,right
,center
andjustify
- I expect different icons may be required. These buttons would toggle block data (something liketextAlignment: string
) - Add a
blockStyleFn
to the alignment plugin which will add css classes depending on thetextAlignment
block data prop. - Implement
handleReturn
inside the alignment plugin to carry over text-alignment of the current block to the next block.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:19 (10 by maintainers)
Top Results From Across the Web
Alignment, Justification, and Indentation - Lumen Learning
Alignment is how text flows in relation to the rest of the page (or column, table cell, text box, etc.). There are four...
Read more >Text Alignment in MS Word - GeeksforGeeks
This feature is used by the user to align text or paragraphs so that it gives a good look or a kind of...
Read more >Align or justify text - Microsoft Support
Text alignment is a paragraph formatting attribute that determines the appearance of the text in a whole paragraph. For example, in a paragraph...
Read more >Text Alignments in Word 2010 - Tutorialspoint
In this chapter, we will discuss text alignments in Word 2010. There are four types of paragraph alignment available in Microsoft Word —...
Read more >text-align - CSS: Cascading Style Sheets - MDN Web Docs
The text-align CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
dying for this.
I’m in the process of building an editor for a new product and apart from this one feature, draft-js-plugins handles all the requirements. Has any progress been started on this yet? If not I may see if I can get up to speed with the plugin system and give this a go myself over the next couple of weeks.