-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add: Format library to the widget screen. #15948
Conversation
packages/edit-widgets/src/index.js
Outdated
@@ -3,6 +3,7 @@ | |||
*/ | |||
import { render } from '@wordpress/element'; | |||
import { registerCoreBlocks } from '@wordpress/block-library'; | |||
import '@wordpress/format-library'; |
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.
Should we add the "package.json" and backend dependency?
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.
Hi @youknowriad, I changed the PR and applied the same approach used by edit-post. The format library is not imported and wp_enqueue* is used to load the scripts and styles. A package.json dependency was added as edit-post also contains it.
d826b0f
to
7222446
Compare
Hi @noisysocks, nice catch the styles problem should be fixed now. |
packages/edit-widgets/package.json
Outdated
@@ -25,6 +25,7 @@ | |||
"@wordpress/block-editor": "file:../block-editor", | |||
"@wordpress/components": "file:../components", | |||
"@wordpress/element": "file:../element", | |||
"@wordpress/format-library": "file:../format-library", |
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.
Should we remove this?
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.
Yes, I think we should, I only added it because the edit-post also contained but I think we can also remove it from there. I created PR to do that #16034.
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 is working great for me!
7222446
to
b4d14bf
Compare
Description
The PR just adds the missing format library to the widget screen.
How has this been tested?
I went to the widget block editor.
I added a paragraph and I verified I could see and use the format options e.g: Bold.