-
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
Block API: Normalize function arguments #5227
Comments
Maybe we could prefer to pass Proposed:
|
This needs a quick proposal or closing. |
I will work on the proposal shared by @aduth. |
|
We should address this before 5.0 lands. This won't be a breaking change but it should simplify using the following API methods at least:
|
We have several functions that take arguments like
blockType
,attributes
,innerHtml
, but the order is not always consistent.Since this is an often repeated pattern, we should consolidate usage.
Examples:
isValidBlock — innerHTML, blockType, attributes.
getBlockAttributes — blockType, innerHTML, attributes.
getAttributesFromDeprecatedVersion — blockType, innerHTML, attributes.
createBlock — name, attributes, innerBlocks.
getSaveContent — blockType, attributes.
The text was updated successfully, but these errors were encountered: