Open cscarbrough opened 2 months ago
@cscarbrough would you mind sending over your model export, so we can import your exact model and test? If you don't want to post it here on Github, send it over a DM on our Slack. In newer versiosn of Webiny, you can't even create a model field with that editor, so we need your export to reproduce. Thanks!
Here's a representative sample model! webiny-samplemodel.json
@cscarbrough Not sure what's going on there, but I'm unable to reproduce it with your sample model. Here's a video from my system 🤔
https://github.com/user-attachments/assets/f32d5a8d-9f85-479a-ab3c-242a7dc6cc56
This is interesting, we haven't altered any of the code in our environment so we should be operating on the same codebase. Would someone be able to point me to the code that does the updating of the UI and I can investigate on my end?
@cscarbrough From the CMS UI perspective, that field is rendered using this field renderer. This renderer is dedicated to the legacy editor.js.
To simplify your debugging, you can create a copy of that renderer, and give it the same plugin name
("cms-editor-field-renderer-rich-text"
), which will overwrite the built-in plugin. You can, for example, register your plugin here in your project.
We're preparing for a few big launches so I haven't been able to dig into the code yet, but here's another sample model that's hopefully more helpful. This one was created in a Webiny 5.15.0 instance of the Headless CMS and exported using the code in this repo. We originally went through this process to populate the updated version of our CMS, so it's as representative as it'll get from our workflow.
Version
5.40.5
Operating System
MacOS
Browser
Chrome
What are the steps to reproduce this bug?
See the attached video for an example. In the video, I pasted the contents of the rich text field, but this occurs when typing as well.
https://github.com/user-attachments/assets/b25bb0f0-90ea-4b31-a233-4b8dd7c17f4a
What is the expected behavior?
The field's data should appear in the editing text box as it was when it was saved prior.
What do you see instead?
After refreshing the page or navigating to the entry at a later time, the rich text field no longer has data in it and instead contains the placeholder text "Click here to type"
https://github.com/user-attachments/assets/b25bb0f0-90ea-4b31-a233-4b8dd7c17f4a
Additional information
Possible solution
No response