-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File block: Make the editor markup match the frontend #30148
Conversation
Size Change: -56 B (0%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
/> | ||
</div> | ||
<RichText | ||
style={ { display: 'inline-block' } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this preferred to using CSS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is particular, I think using CSS is favored but I preferred an inline style here because it's more explicit that this is needed for RichText to work. (It's not just a style, it's behavior in a way)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related to #29976
RichText doesn't allow inline elements to be used as tagName, this was the reason the file block markup didn't match the frontend in the editor. It seems that we can still keep the same markup and just set an "inline-block" display style to the RichText component.
Testing Instructions
Check that the file block look the same in frontend and backend.