"Toggle Bold" / "Toggle Italic" only applies formatting — does not remove it (no longer a toggle)

Steps to reproduce

  1. Open any note in Live Preview mode (also reproducible in Source Mode).
  2. Type some plain text, e.g.: Hello world
  3. Select the text Hello world.
  4. Press Cmd+B (macOS) / Ctrl+B (Windows/Linux) — the text becomes bold (**Hello world**).
  5. With the bold text still selected (or cursor inside it), press Cmd+B / Ctrl+B again.
  6. Expected: The bold formatting is removed, returning to plain Hello world.
  7. Actual: The bold formatting is not removed. The text stays bold, or additional ** markers are inserted around the selection.

The same issue occurs with Toggle Italic (Cmd+I / Ctrl+I).

Did you follow the troubleshooting guide?

Y

  • Tested in the Sandbox Vault (Help → Sandbox Vault) — issue persists.
  • Restricted mode enabled (all community plugins disabled) — issue persists.
  • Default theme — issue persists.
  • Running the latest version of Obsidian (see debug info below).

Expected result

The “Toggle Bold” and “Toggle Italic” commands should toggle — i.e., applying the shortcut to already-formatted text should remove the formatting markers (** or *), returning the text to plain.

This is the standard behavior in virtually every rich-text and markdown editor (VS Code, Google Docs, Notion, Typora, etc.) and was working in previous Obsidian versions.

Actual result

The shortcut only applies bold/italic but never removes it. Pressing the shortcut on already-bolded/italicized text either:

  • Does nothing, or
  • Wraps additional ** / * markers around the already-formatted text (double-bolding).

This makes the commands non-idempotent and no longer function as toggles.

Environment

SYSTEM INFO:
	Obsidian version: 1.13.1
	Installer version: 1.12.7
	Operating system: Darwin Kernel Version 27.0.0: Wed May 27 02:27:52 PDT 2026; root:xnu-13361.0.0.501.1~2/RELEASE_ARM64_T6000 27.0.0
	Login status: logged in
	Language: en
	Catalyst license: vip
	Insider build toggle: on
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none