- πΊπΈUnited States liut
Thanks for creating this issue. Has anyone since looked into adapting this for CKEditor5?
To allow nesting
accordion
intoaccordionContent
, it looks like it's being prevented by this in accordionediting.js:schema.addChildCheck((context, childDefinition) => { // Disallow accordion inside accordionContent. if ( context.endsWith('accordionContent') && childDefinition.name === 'accordion' ) { return false; } });
I've tried removing this and returning
true
but it hasn't worked for me. Also tried messing with some schema rulesallowIn allowWhere allowContentOf
to be able to insert accordion into accordionContent but no luck. Maybe I've got the wrong idea and I'm missing something. - πΊπΈUnited States liut
I realized I needed to re-build the ckeditor-accordion webpack to apply changes. This can be done using yarn or npm. You'll need to make sure to build after you make any changes to the plugins.
With that being said, I commented the lines from the code segment above in
accordionediting.js
and nested functionality is working for CKEditor5. I'll add a patch.Anyone who knows more about this module feel free to edit a better solution if there is one.