FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
fixing two bugs stacked on top of each other in ProseMirror
How-ToWeb Development

fixing two bugs stacked on top of each other in ProseMirror

via Dev.toNora Alalou2h ago

i'm building a markdown editor built on Milkdown (which wraps ProseMirror). i hit a bug in how marks behave when you join blocks together. the bug type a bold heading. move your cursor to the start of it. press Backspace. the heading joins into the paragraph above, but the bold marks bleed into the previously-unstyled paragraph text. i assumed this was a bug in joinTextblockBackward . it wasn't. what's actually going on when you press Backspace at position 0 of a textblock, joinTextblockBackward fires. under the hood, joinTextblocksAround calls: replaceStep ( state . doc , beforePos , afterPos , Slice . empty ) this deletes the boundary between the two blocks. the Fitter algorithm stitches the content of the second block into the first. it doesn't touch inline marks. the text nodes transfer as-is, bold and all. there's a clearIncompatible function that strips marks disallowed by the target node type, but paragraphs allow bold, so nothing gets stripped. there's also splitBlockKeepMarks

Continue reading on Dev.to

Opens in a new tab

Read Full Article
5 views

Related Articles

Android Remote Compose:讓 Android UI 不用發版也能更新
How-To

Android Remote Compose:讓 Android UI 不用發版也能更新

Medium Programming • 1h ago

How-To

Learn Something Old Every Day, Part XVIII: How Does FPU Detection Work?

Lobsters • 7h ago

“Learn to Code” Is Dead… Learn to Think Instead
How-To

“Learn to Code” Is Dead… Learn to Think Instead

Medium Programming • 9h ago

How-To

How One File Makes Claude Code Actually Follow Your Instructions

Medium Programming • 10h ago

LeetCode Solution: 121. Best Time to Buy and Sell Stock
How-To

LeetCode Solution: 121. Best Time to Buy and Sell Stock

Dev.to Tutorial • 10h ago

Discover More Articles