decaporg / decaporg/decap-cms

Hidden link remains when deleting link in markdown widget

Open
#7,640 1 comment 1 reaction 0 assignees View on GitHub
area: extensions/widgets/markdown type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**

When a link is created in the markdown widget in rich text mode and later deleted, the link is not fully removed. The text disappears, but the hyperlink itself remains. This becomes visible when switching to markdown mode.

**To Reproduce**

1. Open page with markdown widget
2. Insert a link inside
3. Delete the linked text - in rich text mode
4. Switch to markdown mode to see that hyperlink is not deleted

**Expected behavior**

Both the text and the hyperlink should be removed when deleting a link.

**Screenshots**

https://github.com/user-attachments/assets/81ad30a6-6ee0-4cca-a412-3491faa33394

**Applicable Versions:**

- Decap CMS version: 3.8.3
- Git provider: GitHub
- OS: macOS 26.0.1
- Browser version: Chrome 141

**CMS configuration**

{name: caption, widget: markdown, i18n: true, required: false, buttons: ["link"], editor_components: []},

Contributor guide

Open the contributing guide

Research direction

Start at the markdown widget's rich-text editor entry point and reproduce the issue using the configuration in the report. Check the generated markdown after deleting linked text in rich text mode, then verify that both the text and hyperlink are absent when switching to markdown mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.