-
Notifications
You must be signed in to change notification settings - Fork 209
Description
Currently, it’s not possible to transform a standard WordPress list block (i.e., core/list) into a Sensei LMS block (i.e., sensei-lms/task-list) within the block editor. The transform option simply doesn’t appear, which limits content conversion workflows.
This is especially inconvenient when migrating or adapting lessons that were originally created with regular blocks and need to take advantage of Sensei’s blocks functionality for lessons or courses.
Proposed solution:
Add a transforms.from definition in blocks registration, so users can easily convert from core blocks.
Possible example:
transforms: {
from: [
{
type: 'block',
blocks: ['core/list'],
transform: ({ values }) => createBlock('sensei-lms/task-list', { content: values }),
},
],
},
Benefits:
- Simplifies the content editing process.
- Reduces manual recreation of Sensei blocks.
- Makes Sensei LMS blocks more interoperable with core WordPress blocks.
I’ve already implemented a working version in a standalone plugin for reference and testing.
Happy to share it or open a PR if the team finds this addition useful.