Text align justify
See original GitHub issueI would like to be able to add three buttons (text align left, text align justify, text align right).
Is this possible with the current version of trix?
Is there anyway to pass a class to a blockAttribute
?
All I was able to do, was add a new textAttribute
that has a custom tagName
, which I can then style through CSS (display: block; text-align: justify;
).
Trix.config.textAttributes.textAlignJustify = { tagName: 'div-text-align-justify' }
The problem with custom HTML tags is browser support. Because although it’s defined in HTML 5, only Chrome (and Opera) provide support.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:12 (2 by maintainers)
Top Results From Across the Web
CSS text-align property - W3Schools
The text-align property specifies the horizontal alignment of text in an element. Show demo ❯. Default value: left if direction is ltr, and...
Read more >text-align - CSS: Cascading Style Sheets - MDN Web Docs
The text-align property is specified in one of the following ways: Using the keyword values start , end , left , right ,...
Read more >Align or justify text - Microsoft Support
Click anywhere in the paragraph that you want to justify. On the Home tab, in the Paragraph group, click Justify Text Justify text...
Read more >Centered, Justified, Right Aligned Text Style Example
We use the CSS text-align property to align content inside a block-level element. Examples of block-level elements are paragraphs ( <p>.
Read more >text-justify | CSS-Tricks
The text-justify property in CSS is a companion to the text-align property that is used to set the justification method of text when ......
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 Free
Top 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
Would love to see this implemented!
Unfortunately text alignment is a very standard option which is missing from trix entirely—I see this is now a pretty old issue, but is what will keep us from using trix for our editor capability.