-
Notifications
You must be signed in to change notification settings - Fork 4k
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 documentation describing block transforms #5189
Add documentation describing block transforms #5189
Conversation
content, | ||
} ); | ||
}, | ||
}, |
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 stop here in this example and leave the shortcode for another example (to match the text above)?
docs/block-api.md
Outdated
|
||
For example, a paragraph block can be transformed into a heading block. | ||
|
||
```js |
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 do an es5/esnext version like the other examples in the handbook?
Thanks for this, left a minor comment but this is looking good for a start. I think we probably want to move these to a separate file at some point because there's a lot to say about transforms, but it's fine for now. |
👍 |
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 👍
Here's a first pass on the documentation on defining block transforms. There's a couple transform types I haven't used before (regular expression, raw DOM node) that I could use some explanations for myself so I can add them to the docs.