Update Docs: Improve custom widgets documentation #7032
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://deploy-preview-7032--decap-www.netlify.app/docs/custom-widgets/
Fix the code example
The code example for the
registerEditorComponent
is incorrect as the linename: 'details',
should bename: 'detail',
. I think this mistake has come about because we're naming the field name the same as the HTML element<details>
.I'm proposing to rename it to
contents
to avoid this mistake in the future.Markup headings correctly
We're currently marking up what look like headings with a
**
bold to make it look like a heading. I'm proposing we use actual headings here.Remove 'results' section
It seems to be from some previous code example where it referred to a Youtube widget. This doesn't seem to be relevant anymore.
Remove unnecessary links
Looks like Gatsby create the anchor links automatically for each heading so we don't need to define them for the 'Development' and 'Production & Publishing' headings