ckeditor icon indicating copy to clipboard operation
ckeditor copied to clipboard

[4.x] - Nested CKEditor fields deleting content and functionality not working

Open zizther opened this issue 1 year ago • 2 comments

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

  1. Create a matrix field
  2. 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

zizther avatar Aug 01 '24 13:08 zizther

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 avatar Aug 06 '24 21:08 missatrox44

@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)?

i-just avatar Aug 09 '24 08:08 i-just