# Inline edits broken for MDX files

**URL:** <https://forum.cursor.com/t/inline-edits-broken-for-mdx-files/152961>\
**Category:** Bug Reports\
**Tags:** inline-edit\
**Created:** [February 25, 2026, 7:59pm UTC](https://forum.cursor.com/t/inline-edits-broken-for-mdx-files/152961 "2026-02-25T19:59:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SanderCokart](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/sandercokart/32/95887_2.png) [@SanderCokart](https://forum.cursor.com/u/SanderCokart)\
**Post date:** [February 25, 2026, 7:59pm UTC](https://forum.cursor.com/t/inline-edits-broken-for-mdx-files/152961/1 "2026-02-25T19:59:35Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Any and I mean ANY inline code changes in mdx files always results in deleting the selected content.  
Cursor cannot edit mdx files it looks like. No matter what you tell the AI to change it to it will always delete the selected content.

### Steps to Reproduce

- create a new mdx file with .mdx extension.
- add some basic markdown content
- open the inline editor ctrl + k.
- select some content
- ask inline chat to make a change
- cursor removes the selected content

### Expected Behavior

Edit the file like any other file

### Operating System

Windows 10/11

### Version Information

Version: 2.5.25 (user setup)  
VSCode Version: 1.105.1  
Commit: 7150844152b426ed50d2b68dd6b33b5c5beb73c0  
Date: 2026-02-24T07:17:49.417Z  
Build Type: Stable  
Release Track: Default  
Electron: 39.4.0  
Chromium: 142.0.7444.265  
Node.js: 22.22.0  
V8: 14.2.231.22-electron.0  
OS: Windows\_NT x64 10.0.26200

### For AI issues: which model did you use?

gemini-2.0-flash, claude haiku 4.5

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [February 26, 2026, 4:59am UTC](https://forum.cursor.com/t/inline-edits-broken-for-mdx-files/152961/3 "2026-02-26T04:59:58Z")

</div>

Hey, thanks for the report. I tried to reproduce it on my side, and inline edit in MDX files works fine.

Could you clarify:

1. Is this only happening in `.mdx` files, or in other file types too (`.md`, `.tsx`, `.js`)?
2. Share a minimal MDX example where it breaks consistently.
3. Please try with extensions disabled. Run `cursor --disable-extensions` and check if it still happens.

Let me know how it goes.

---

<div class="post-metadata">

**Author:** ![SanderCokart](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/sandercokart/32/95887_2.png) [@SanderCokart](https://forum.cursor.com/u/SanderCokart)\
**Post date:** [February 28, 2026, 6:08pm UTC](https://forum.cursor.com/t/inline-edits-broken-for-mdx-files/152961/4 "2026-02-28T18:08:42Z")

</div>

It depends on the content of the file, an empty one works fine. But certain syntax breaks it.

For example here is my mdx file:

[test.mdx.txt](https://forum.cursor.com/uploads/short-url/4GqWmiGDUHN7ZFF4SOU2dG7lx9z.txt) (1007 Bytes)

Possibly problems with the markdown syntax as alot of ai models output in markdown for the most part with the ```

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [March 22, 2026, 6:09pm UTC](https://forum.cursor.com/t/inline-edits-broken-for-mdx-files/152961/5 "2026-03-22T18:09:17Z")

</div>

Closed on March 22, 2026, 6:09pm UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
