-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
🐞 Coding Issue: Live Preview not updating
Description:
When editing Markdown files in the Decap CMS editor, the preview pane does not refresh automatically after content changes. Users must switch away from the editor or manually trigger a refresh to see updates.
Steps to Reproduce:
- Open Decap CMS (self-hosted or demo version).
- Create or edit a Markdown-based entry (e.g., blog post).
- Type some text and wait for the preview to update.
- Observe that the preview remains stale until focus is lost or a manual save occurs.
Expected Behavior:
The preview pane should update automatically as content changes are made in the editor.
Actual Behavior:
The preview remains outdated until a manual refresh or navigation change.
Possible Cause (Hypothesis):
The onChange handler for the Markdown editor may not be properly triggering a state update in the preview component. The issue could be in:
decap-cms-core/src/components/Editor/EditorControlPane/EditorControlPane.js- or the Redux store not propagating the change to the preview frame.
Proposed Fix:
- Ensure that the preview iframe listens for content updates from the editor.
- Add throttled state synchronization to improve performance.
- Validate that
updatePreview()(or equivalent) fires on every content change event.
Environment:
- Decap CMS version: Latest (as of Nov 2025)
- Browser: Firefox 144.0 / Chrome 130+
- Hosting: Local test instance (
npx decap-server)
Additional Context:
This issue affects the user experience when writing Markdown-rich content and can cause confusion for non-technical editors.