Pullquote: Adding block alignments and using proper placeholder#1268
Pullquote: Adding block alignments and using proper placeholder#1268youknowriad merged 6 commits intomasterfrom
Conversation
|
Nice! Thanks for working on this. When left floated, there's an issue with the layout. I think we need to port the following from being image only, to being for all things left aligned: If you remove the placeholder text in the main body of the quote, you get an empty pullquote entirely: This is an interesting state. If you empty out the main field we should at least have "Write quote..." in the main. But the edgecase here is: do we also want it to show when the block is unselected? |
|
@jasmussen I've fixed the placeholder behaviour and I could use some help with the float left styling issue. I'm not sure I understand correctly and I'm not really aware of how these positioning work right now. |
|
Nice! I pushed a little alignment fix. More work needs doing, but I'll ticket/do that separately. I think we should get this in. |
blocks/editable/index.js
Outdated
| ! content || | ||
| ! content.length || | ||
| // On non-inline editables, TinyMCE appends an empty <p> tag | ||
| ( ! this.props.inline && content.length === 1 && ! content[ 0 ].props.children ), |
There was a problem hiding this comment.
Could we hook into TinyMCE's internal empty checking?
I was wondering why we wouldn't have had to account for br[data-mce-bogus] which is added similar to empty <p> tag here. Appears we do some clean-up in getContent already. Should we be stripping the empty paragraphs there?
There was a problem hiding this comment.
Thihs works great 👍
blocks/library/pullquote/index.js
Outdated
| value: nextValue, | ||
| } ) | ||
| } | ||
| placeholder={ ( 'Write Quote…' ) } |
There was a problem hiding this comment.
hahaha, hard to notice because it works
0e78102 to
d2d4a83
Compare
d2d4a83 to
9efa4c4
Compare

closes #1221
closes #1222
This PR enhances the pullquote block by adding block level alignment controls and is using a proper placeholder instead of default values.