Skip to content

Add clarification on the shortcode transformation#41662

Open
grappler wants to merge 1 commit intoWordPress:trunkfrom
grappler:patch-1
Open

Add clarification on the shortcode transformation#41662
grappler wants to merge 1 commit intoWordPress:trunkfrom
grappler:patch-1

Conversation

@grappler
Copy link
Copy Markdown
Member

What?

Add clarification on the shortcode transformation.

Why?

Because the documentation is unclear.

How?

Updating the documentation.

### Shortcode

This type of transformations support the _from_ direction, allowing blocks to be created from shortcodes. It's applied as part of the `raw` transformation process.
This type of transformations support the _from_ direction, allowing blocks to be created from shortcodes. It's applied as part of the `raw` transformation process. This means that the conversion happens when running "Convert to blocks" on the classic block. To transform the shortcode block use the `block` transformation process.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The raw transformation process is also used during copy-paste operations e.g: if a shortcode is pasted in the editor it is transformed in the equivalent block. I guess we could say "This means that the conversion happens when running "Convert to blocks" on the classic block or when pasting a shortcode on the block editor..."

Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a suggestion of en enhacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants