In case anyone is interested, I’m answering my question:
The blocks
parameter in the transform code should be [ 'core/legacy-widget' ]
instead of [ 'my/custom-block' ]
. For a from
transform it indicates the block(s) you want to transform from, which in this case is a legacy widget.
Related Posts:
- Gutenberg custom block plugin with custom image sizes
- Get loading state of wp data selector
- Get Block Attributes in JSON REST API
- Checks when fetching data from multiple REST API endpoints in Gutenberg
- Search for a keyword across post types in a Gutenberg component
- Using apiFetch for retrieving post data in Gutenberg
- Get terms of a taxonomy using useSelect
- Problem extending a core block
- Update block once an API request returns with a value
- Trigger Javascript on Gutenberg (Block Editor) Save
- Nonce retrieved from the REST API is invalid and different from nonce generated in wp_localize_script
- Gutenberg – remove / add blocks with custom script
- What are all the query parameters for getEntityRecords?
- How to use wp.hooks.addAction() in React JS/Gutenberg?
- REST API: Backbone and custom endpoint
- How to only enqueue block javascript on the frontend when its needed [duplicate]
- Extend core block in Gutenberg
- Show control conditionally in Gutenberg
- Hooking a callback into the code within a Gutenberg block
- conditional layout based on if Innerblocks is not empty
- Gutenberg extend blocks add new class name
- initial open/toggle PluginDocumentSettingPanel panel in document setting block editor gutenberg
- WP REST – video and audio players
- Get post from custom REST endpoint in Gutenberg
- Headless WordPress: How to authenticate front end requests?
- Correctly handling WordPress core data retrieval in Gutenberg
- Post to WordPress using REST API from external site
- Is there a client side API for handling transients or options?
- How to handle malformed response from WP REST API?
- Rest API authentication issue when called from fetch request in bundle.js
- WordPress Rest API only returns content when posttype has editor capability
- Adding a text element in between title and blocks container
- Gutenberg RichText
- Rest API invalid nonce with Backbone Client
- Use useSelect/useDispatch instead of withSelect/withDispatch
- How to handle Gutenberg wp.data async errors?
- Set current tab on a Gutenberg TabPanel component from outside that component
- How to use wp.hooks.addAction() in React JS/Gutenberg?
- Load script after block is inserted
- Gutenberg block “This block appears to have been modified externally” on save
- How do I access site and block editor state data and use `useSelect()` or `withSelect()` to bind it to my components?
- Block Editor: How to get title and post content within the WordPress admin UI in Javascript?
- Custom block SelectControl works but equivalent ComboboxControl gives errors – where’s my mistake?
- Gutenberg add extra attributes to custom format
- event/callback on block update?
- How to remove p / br elements from gutenbergs editor
- How to disable inline css styles generated by Gutenberg editor?
- Gutenberg getMedia() in post query doesn’t return all featured images
- Gutenberg select categories
- Listening change event of taxonomy term checkboxes in Gutenberg editor
- Gutenberg get core data – search
- What is the correct way to import the blocks-editor?
- Open MediaUpload from external component in Gutenberg
- Gutenberg extend blocks add new class name
- How to add classes and events to image in javascript using Gutenberg?
- Add custom classes for blocks in editor based on custom attributes
- Looping over wordpress meta to create “ ‘s?
- How to load an additional script for a block in the block editor?
- useSelect second parameter
- Gutenberg consume wp-json data and reflect in frontend the content
- Trigger wp-embed via JavaScript to refresh iframe preview?
- Gutenberg getBlockIndex in save() function
- Widgets and Post/Page edit/new blank, console errors only, no server errors
- Trying to turn the Edit function into a class to be able to use React lifecycle methods
- Gutenberg richtext block vaildation failed
- Conditional save return on Gutenberg Block
- Can I alter the block editor’s paste text behavior?
- Custom Gutenberg-Block esnext pass variables
- Return ‘X-WP-Total’ from headers in response
- How to read inline-CSS from Gutenberg block?
- Custom Gutenberg block: access dom element via JavaScript
- Custom Block – save.js function not saving attributes
- Gutenberg – useEffect manipulate DOM after block re-renders DOM
- how to use nimble-API and Display data?
- Script widget works only in admin view but not in Public
- Need help in fixing javascript in WordPress
- Why does my array sort order changes when I pass it to JS using WP_REST_Response?
- Including dependencies using @wordpress/dependency-extraction-webpack-plugin
- Uncaught TypeError: r is not a function
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Access checks with custom REST endpoints and backbone
- script not working anymore after saving widget settings
- How to pass data to javascript in custom widget class
- Custom block update rendering when reused
- WordPress Gutenberg Ajax request
- WP Gutenberg – custom block with two content fields
- How do I make a savable preview like Youtube Gutenberg block?
- iFrame onLoad in custom Gutenberg block
- I would like to retrive JSON value and display it in wordpress page or widget
- Block pattern conflict with custom block
- Table block variation with header section activated
- Filtering Gutenberg Components, not Blocks
- How to delete child block for associated parent block
- WP REST API – “rest_user_cannot_view” ONLY on specific users
- Passing object to FormTokenField suggestions
- How to add a new attribute to core wp block editor without npm?
- How do i get an Inline style in Gutenberg Block show up in front end?
- WordPress adds and tags into HTML blocks after saving
- Gutenberg core/file add style support in js/ json
- Working with a non-React external library in a custom block