[4.x] - Nested CKEditor fields deleting content and functionality not working
Description
I have a nested matrix field which contains a CKEditor field, there are some instances where I am not able to paste content into the field or click the Source button, refreshing the page allows me to sometimes solve the Source button issue and paste content via the source Additionally it is not possible to add a link either.
Upon saving, sometimes the all content is removed from the field.
Steps to reproduce
- Create a matrix field
- Add a nested matrix field with a CKEditor field within it
Additional info
- Craft version: 5.2.9
- PHP version: 8.3
- Database driver & version: MySQL 8
- Plugins & versions: CKEditor 4.1.0
I am having a similar issue with MediaEmbed in CKEditor. I am not using a matrix field but rather adding it directly. I can select the MediaEmbed icon and am able to enter the embedded url then click the green checkmark. The embedded media preview shows up in the editor but does not persist on page reload after entry is Saved.
Additional info
- Craft version: Craft Pro 5.2.5
- PHP version: 8.2.20
- Database driver & version: MySQL 8.0.36
- Plugins & versions: CKEditor 4.1.0
@missatrox44, it sounds like you could be running into a different issue than @zizther. Please double-check your HTML Purifier config. You can find more info about that in the docs and on the following issues: https://github.com/craftcms/ckeditor/issues/59, https://github.com/craftcms/ckeditor/issues/80.
@zizther, can you please describe your issue in a bit more detail? What do you do after creating the fields you described? What are you expecting to happen vs what’s actually happening? Are there any errors in the console when you encounter the issue(s)?