# @tiptap/markdown

## 3.23.4

### Patch Changes

- @tiptap/core@3.23.4
- @tiptap/pm@3.23.4

## 3.23.3

### Patch Changes

- @tiptap/core@3.23.3
- @tiptap/pm@3.23.3

## 3.23.2

### Patch Changes

- Updated dependencies [f98eaaf]
  - @tiptap/core@3.23.2
  - @tiptap/pm@3.23.2

## 3.23.1

### Patch Changes

- @tiptap/core@3.23.1
- @tiptap/pm@3.23.1

## 3.23.0

### Patch Changes

- 0e6a6e4: Fix editor becoming unresponsive when initialized with empty markdown content and `contentType: 'markdown'`
- 57f8d66: Fix markdown parsing for bullet list items whose text looks like an ordered-list marker, such as `- 123.`, so extraction no longer loses the item content.
- 4796013: Fixed two Markdown serialization bugs: overlapping marks (e.g. bold+italic that start and end at different positions) now serialize with the correct delimiter order, and marks that all close on the same node now close in LIFO order to produce valid nesting.
- Updated dependencies [57f8d66]
- Updated dependencies [e64e5a7]
- Updated dependencies [207a2bc]
  - @tiptap/core@3.23.0
  - @tiptap/pm@3.23.0

## 3.22.5

### Patch Changes

- Updated dependencies [a375002]
  - @tiptap/core@3.22.5
  - @tiptap/pm@3.22.5

## 3.22.4

### Patch Changes

- 27ea931: Fix dependencies installation after packages updates producing peer dependency resolution conflicts
- Updated dependencies [27ea931]
- Updated dependencies [64f36b8]
- Updated dependencies [032f8f1]
  - @tiptap/core@3.22.4
  - @tiptap/pm@3.22.4

## 3.22.3

### Patch Changes

- Updated dependencies [cb28e7b]
  - @tiptap/core@3.22.3
  - @tiptap/pm@3.22.3

## 3.22.2

### Patch Changes

- Updated dependencies [f1d504c]
- Updated dependencies [404c683]
  - @tiptap/core@3.22.2
  - @tiptap/pm@3.22.2

## 3.22.1

### Patch Changes

- Updated dependencies [ee03ac0]
- Updated dependencies [b88f9ed]
  - @tiptap/core@3.22.1
  - @tiptap/pm@3.22.1

## 3.22.0

### Patch Changes

- 912a49b: Fix HTML character escaping in markdown roundtrip. HTML entities (`&lt;`, `&gt;`, `&amp;`, `&quot;`) are now decoded to literal characters when parsing markdown into the editor. `<`, `>`, and `&` are re-encoded when serializing back to markdown, while `"` is preserved as a literal character since double quotes are ordinary in markdown. Code detection for skipping encoding now uses the `code: true` extension spec instead of hardcoded type names. Literal characters inside code blocks and inline code are always preserved.
- Updated dependencies [912a49b]
- Updated dependencies [7d4fb9a]
- Updated dependencies [0c1c112]
- Updated dependencies [0c1c112]
- Updated dependencies [f99bdc2]
  - @tiptap/core@3.22.0
  - @tiptap/pm@3.22.0

## 3.21.0

### Patch Changes

- 75a912a: Fix custom markdown tokenizer helper lexing to use Marked's active lexer so ordered list parsing no longer breaks inline tokenization in following paragraphs.
  - @tiptap/core@3.21.0
  - @tiptap/pm@3.21.0

## 3.20.6

### Patch Changes

- @tiptap/core@3.20.6
- @tiptap/pm@3.20.6

## 3.20.5

### Patch Changes

- @tiptap/core@3.20.5
- @tiptap/pm@3.20.5

## 3.20.4

### Patch Changes

- Updated dependencies [0bcf3c2]
  - @tiptap/core@3.20.4
  - @tiptap/pm@3.20.4

## 3.20.3

### Patch Changes

- 6b9ea92: Fixed overlapping bold and italic markdown serialization and round-tripping.
- Updated dependencies [c94fac4]
- Updated dependencies [6b9ea92]
  - @tiptap/core@3.20.3
  - @tiptap/pm@3.20.3

## 3.20.2

### Patch Changes

- 269823d: Improved markdown empty-paragraph roundtripping across top-level and nested block content. Empty paragraphs now serialize with natural blank-line spacing for the first paragraph in a run and `&nbsp;` markers for subsequent empty paragraphs at the same level, while parsing preserves those empty paragraphs when converting markdown back to JSON.
- Updated dependencies [269823d]
  - @tiptap/core@3.20.2
  - @tiptap/pm@3.20.2

## 3.20.1

### Patch Changes

- Updated dependencies [25f57e4]
  - @tiptap/core@3.20.1
  - @tiptap/pm@3.20.1

## 3.20.0

### Patch Changes

- 6e3a0e8: Fixed getMarkdown() returning `&nbsp;` instead of empty string when editor is empty
- Updated dependencies [4b731e2]
- Updated dependencies [98546ac]
- Updated dependencies [57624a1]
- Updated dependencies [76ce47d]
  - @tiptap/core@3.20.0
  - @tiptap/pm@3.20.0

## 3.19.0

### Patch Changes

- @tiptap/core@3.19.0
- @tiptap/pm@3.19.0

## 3.18.0

### Patch Changes

- 9b388ef: Upgrade marked.js from v15.0.12 to v17.0.1. Note that `**)**` requires whitespace when adjacent to alphanumeric text per CommonMark specification.
  - @tiptap/core@3.18.0
  - @tiptap/pm@3.18.0

## 3.17.1

### Patch Changes

- 62c6f15: Fixed markdown serialization doubling newlines and parsing collapsing multiple blank lines
- 4bcacda: Fixed markdown HTML parsing when window object is unavailable in server-side environments
- 5d267cb: Fixed ordered list numbering when list has a non-default start value
- Updated dependencies [aa9709e]
- Updated dependencies [b46e66a]
  - @tiptap/core@3.17.1
  - @tiptap/pm@3.17.1

## 3.17.0

### Patch Changes

- Updated dependencies [eecf1c9]
  - @tiptap/core@3.17.0
  - @tiptap/pm@3.17.0

## 3.16.0

### Patch Changes

- d63518a: Fix incorrect Markdown output when underline is mixed with bold or italic and their ranges do not fully overlap.
- d63518a: Fix overlapping underline/bold/italic serialization and add tests
  - @tiptap/core@3.16.0
  - @tiptap/pm@3.16.0

## 3.15.3

### Patch Changes

- Updated dependencies [8f86f06]
  - @tiptap/core@3.15.3
  - @tiptap/pm@3.15.3

## 3.15.2

### Patch Changes

- @tiptap/core@3.15.2
- @tiptap/pm@3.15.2

## 3.15.1

### Patch Changes

- @tiptap/core@3.15.1
- @tiptap/pm@3.15.1

## 3.15.0

### Patch Changes

- Updated dependencies [ac8361c]
  - @tiptap/core@3.15.0
  - @tiptap/pm@3.15.0

## 3.14.0

### Patch Changes

- @tiptap/core@3.14.0
- @tiptap/pm@3.14.0

## 3.13.0

### Patch Changes

- 7725052: Fixed trailing and leading whitespace handling in markdown serialization for inline marks
- Updated dependencies [526365a]
- Updated dependencies [e3b4f68]
  - @tiptap/core@3.13.0
  - @tiptap/pm@3.13.0

## 3.12.1

### Patch Changes

- @tiptap/core@3.12.1
- @tiptap/pm@3.12.1

## 3.12.0

### Patch Changes

- Updated dependencies [f232c5a]
  - @tiptap/core@3.12.0
  - @tiptap/pm@3.12.0

## 3.11.1

### Patch Changes

- Updated dependencies [d0c4264]
  - @tiptap/core@3.11.1
  - @tiptap/pm@3.11.1

## 3.11.0

### Patch Changes

- Updated dependencies [541c93c]
  - @tiptap/core@3.11.0
  - @tiptap/pm@3.11.0

## 3.10.8

### Patch Changes

- f3bb5c1: Fixed CommonJS compatibility by downgrading `marked` dependency from v16 to v15.
- Updated dependencies [8375241]
- Updated dependencies [b7ead7c]
- Updated dependencies [95d3e80]
- Updated dependencies [fd479bd]
  - @tiptap/core@3.10.8
  - @tiptap/pm@3.10.8

## 3.10.7

### Patch Changes

- @tiptap/core@3.10.7
- @tiptap/pm@3.10.7

## 3.10.6

### Patch Changes

- @tiptap/core@3.10.6
- @tiptap/pm@3.10.6

## 3.10.5

### Patch Changes

- Updated dependencies [92fae18]
  - @tiptap/core@3.10.5
  - @tiptap/pm@3.10.5

## 3.10.4

### Patch Changes

- Updated dependencies [64561c4]
  - @tiptap/core@3.10.4
  - @tiptap/pm@3.10.4

## 3.10.3

### Patch Changes

- 13fdcb5: Fix markdown serialization to prevent marks from continuing after hard breaks. Previously, marks like bold would incorrectly persist across hard breaks in the markdown output.
- 5774fc2: Fixed a bug where marks were resolved in incorrect orders, breaking markdown rendering for nested marks.
- f80391b: Fix parsing of mixed bullet lists and task lists. Previously, Marked.js would group consecutive bullet list items and task list items into a single list token, causing incorrect parsing. Now the parser detects mixed lists and splits them into separate bulletList and taskList nodes.
  - @tiptap/core@3.10.3
  - @tiptap/pm@3.10.3

## 3.10.2

### Patch Changes

- 194af3b: Fix parsing of mixed inline HTML within Markdown content so that inline HTML fragments are parsed correctly.
  - @tiptap/core@3.10.2
  - @tiptap/pm@3.10.2

## 3.10.1

### Patch Changes

- Updated dependencies [3564e7c]
  - @tiptap/core@3.10.1
  - @tiptap/pm@3.10.1

## 3.10.0

### Patch Changes

- Updated dependencies [4aa9f57]
- Updated dependencies [4aa9f57]
  - @tiptap/core@3.10.0
  - @tiptap/pm@3.10.0

## 3.9.1

### Patch Changes

- @tiptap/core@3.9.1
- @tiptap/pm@3.9.1

## 3.9.0

### Patch Changes

- Updated dependencies [bbb8e16]
  - @tiptap/core@3.9.0
  - @tiptap/pm@3.9.0

## 3.8.0

### Patch Changes

- @tiptap/core@3.8.0
- @tiptap/pm@3.8.0

## 3.7.2

### Patch Changes

- @tiptap/core@3.7.2
- @tiptap/pm@3.7.2

## 3.7.1

### Patch Changes

- f1fc469: Editors will not throw an error anymore when `content` is an empty string and `contentType` is `markdown`
- c9036bd: Remove invalid server configuration from package.json
  - @tiptap/core@3.7.1
  - @tiptap/pm@3.7.1

## 3.7.0

### Minor Changes

- 35645d9: Add comprehensive bidirectional markdown support to Tiptap through a new `@tiptap/markdown` package and Markdown utilities in `@tiptap/core`.

  **New Package: `@tiptap/markdown`** - A new official extension that provides full Markdown parsing and serialization capabilities using [MarkedJS](https://marked.js.org) as the underlying Markdown parser.

  **Core Features:**

  **Extension API**

  - **`Markdown` Extension**: Main extension that adds Markdown support to your editor
  - **`MarkdownManager`**: Core engine for parsing and serializing Markdown
    - Parse Markdown strings to Tiptap JSON: `editor.markdown.parse(markdown)`
    - Serialize Tiptap JSON to Markdown: `editor.markdown.serialize(json)`
    - Access to underlying marked.js instance: `editor.markdown.instance`

  #### Editor Methods

  - **`editor.getMarkdown()`**: Serialize current editor content to Markdown string
  - **`editor.markdown`**: Access to MarkdownManager instance for advanced operations

  **Editor Options:**

  - **`contentType`**: Control the type of content that is inserted into the editor. Can be `json`, `html` or `markdown` - defaults to `json` and will automatically detect invalid content types (like JSON when it is actually Markdown).
    ```typescript
    new Editor({
      content: '# Hello World',
      contentType: 'markdown',
    })
    ```

  **Command Options:** All content commands now support an `contentType` option:

  - **`setContent(markdown, { contentType: 'markdown' })`**: Replace editor content with markdown
  - **`insertContent(markdown, { contentType: 'markdown' })`**: Insert markdown at cursor position
  - **`insertContentAt(position, markdown, { contentType: 'markdown' })`**: Insert Markdown at specific position

  For more, check [the documentation](https://tiptap.dev/docs/editor/markdown).

### Patch Changes

- Updated dependencies [35645d9]
- Updated dependencies [35645d9]
- Updated dependencies [35645d9]
  - @tiptap/core@3.7.0
  - @tiptap/pm@3.7.0
