-
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
Reformat and correct blocks/README.md
#1794
Conversation
blocks/README.md
Outdated
- `save( { attributes: Object } ): WPElement | String` - Returns an element | ||
describing the markup of a block to be saved in the published content. This | ||
function is called before save and when switching to an editor's HTML view. | ||
- `encodeAttributes( attributes: Object ): Object` - Called when save markup is |
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.
We should probably drop this as it's not implemented
blocks/README.md
Outdated
- `placeholder: string` - A text hint to be shown to the user when the field value is empty, similar to the [`input` and `textarea` attribute of the same name](https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/HTML5_updates#The_placeholder_attribute) | ||
- `value: string` - Markup value of the editable field. Only valid markup is allowed, as determined by `inline` value and available controls. | ||
- `onChange: Function` - Callback handler when the value of the field changes, passing the new value as its only argument. | ||
- `inline: boolean` - If true, only inline elements are allowed to be used in |
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.
I think it's multiple
prop (which takes a tagName) now as it's inline by default.
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.
Thanks for fixing this 👍
It buys us time to build the documentation website with the guide.
This is where it'll be really important to provide a working template/example that people can use to get started. In the meantime I've updated the wording here. |
Mostly fixing the hook names updated/added in #1717; also reformatting a few things for clarity and for readability of the source file.
Temporary fix pending a more complete documentation solution like #1786 - we should get this in first.
People will be reading this document more and more as it's linked from make/core posts, and perhaps more importantly, it's now actually possible to create plugins that register blocks.
It will be easiest to review this PR using GitHub's markdown diff mode.