# Deprecations

This page lists the old names and options the source marks for removal in 2.x, which still work today, together with their replacements.

## Global Class Aliases

| Old name | Use instead | Note |
|---|---|---|
| `PDMarkdownEditor` | `MDEditor` | Marked "deprecated in 2.0.0" in the source |
| `PDMarkdownViewer` | `MDViewer` | Same |

Both names point to the same class and behave identically.

## MDEditor Methods

Each old method forwards to the new one:

| Old method | Use instead |
|---|---|
| `goBack()` | `undo()` |
| `goForward()` | `redo()` |
| `addHeading(event, num)` | `heading(event, num)` |
| `addBold(event)` | `bold(event)` |
| `addItalic(event)` | `italic(event)` |
| `addStrikethrough(event)` | `strikethrough(event)` |
| `addUnderline(event)` | `underline(event)` |
| `addMarker(event)` | `marker(event)` |
| `addSup(event)` | `sup(event)` |
| `addSub(event)` | `sub(event)` |
| `addCode(event)` | `code(event)` |
| `addBlockquote()` | `blockquote()` |
| `addUl()` | `ul()` |
| `addOl()` | `ol()` |
| `addLink(title, href)` | `link(title, href)` |
| `addImage(src, alt, title)` | `image(src, alt, title)` |
| `downloadMd()` | `download("md")` |
| `downloadHtml()` | `download("html")` |
| `getTxt()` | The `text` property |

## MDEditor Top-level Options

| Old option | Use instead |
|---|---|
| `mode` | `style.mode` |
| `fillMode` | `style.fill` |
| `showRow` | `style.showRow` |
| `fontFamily` | `style.fontFamily` |
| `focusBackgroundColor` | `style.focus.backgroundColor` |
| `focusTextColor` | `style.focus.color` |
| `placeholder` (string) | `style.placeholder.text` |
| `placeholderColor` | `style.placeholder.color` |

When present, an old option overrides the matching `style` value because it is applied afterwards.

## MDViewer Top-level Options

| Old option | Use instead |
|---|---|
| `pre` | `emptyContent` |
| `fillMode` | `style.fill` |
| `delay` | `sync.delay` |
| `scrollSync` | `sync.scroll` |
| `fontFamily` | `style.fontFamily` (an empty old option defaults to `'Noto Sans TC', sans-serif`) |
| `tagPath` | `hashtag.path` |
| `tagTarget` | `hashtag.target` |

When both `emptyContent` and `pre` are present, `emptyContent` wins.

## Removed APIs

No public API has been removed; every name above still works in v1.11.6.
