-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
When loading a collection item into the editor which has a code block with a language mode set on it, the editor will report that there are "unsaved changes".
However, if you save the item, no change will be made to the source document, even though it has reported that there is an unsaved change.
To Reproduce
- Open a collection item for editing which has a field with a markdown widget
- Add a code block to the field using the visual editor. In the code settings, assign a language using the "mode" option
- Save the post, then reopen it
- Note that the "Unsaved changes" message is displayed at top left
Note that the content is correctly saved with the language attribute, e.g.:
```java
// some code in here
```
Expected behavior
We should see "Changes saved" in the top left corner. If no language mode is set on the code, we do not see the issue.
Applicable Versions:
- Decap CMS version: 3.6.2
- Git provider: GitLab or local
- OS: MacOS 15.3.2
- Browser version: Firefox Developer 137
- Node.JS version: 23.10.0
dlford
Metadata
Metadata
Assignees
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code