Transform paragraph block to buttons block#28508
Transform paragraph block to buttons block#28508ntsekouras merged 6 commits intoWordPress:masterfrom
Conversation
|
Side note: one thing we need to revise a bit is the order of transformations. Headings and List should probably come first, for example. We might also want to restrict certain transforms to the case where the length of a paragraph block is < than some characters — it doesn't make sense to convert a full paragraph with multiple lines into a button, for example. |
Maybe also checking if a paragraph has more than one links? |
Yes, I think this is out of scope for this PR.
You can use
I was thinking of not transforming. |
|
@mtias @ntsekouras Thank you for the feedback! The changes have been pushed. ✌️ |
Let's try it, we can always adjust :) |
|
@ntsekouras Thanks for the tips!! I made the changes. |
|
Thanks for working on this @hsingyuc ! |

Description
Fix #28298
Transform paragraph block to buttons block
How has this been tested?
// Test text with one link
Link in Paragraph, clickChange block type or styleand see ifButtonsrenders as expected.Buttonsand see if the text transforms into a button with the link.// Test texts with links
Link in Paragraph, clickChange block type or styleand see ifButtonsrenders as expected.Buttonsand see if the text transforms into a button with the first link (link1).// Test texts without a link
Link in Paragraph, clickChange block type or styleand see ifButtonsrenders as expected.Buttonsand see if the text transforms into a button.Screenshots
Types of changes
Checklist: