← Back to Plugins
Channels

Plugin Markdown Strip

synistr By synistr 👁 56 views ▲ 0 votes

OpenClaw plugin that strips Markdown formatting from outgoing messages on plaintext channels like iMessage

GitHub

Install

openclaw plugins install openclaw-plugin-markdown-strip

Configuration Example

// ~/.openclaw/openclaw.json
{
  "plugins": {
    "entries": {
      "markdown-strip": {
        "enabled": true,
        "config": {
          "channels": ["imessage", "signal", "whatsapp"]
        }
      }
    }
  }
}

README

# openclaw-plugin-markdown-strip

OpenClaw plugin that strips Markdown formatting from outgoing messages on plaintext channels.

LLMs like Claude produce Markdown by default — `**bold**`, `_italic_`, `### headers`, `` `code` ``, `- lists`. On channels like iMessage that don't render Markdown, this results in ugly raw syntax in your messages. This plugin hooks into `message_sending` and removes all Markdown formatting before delivery.

## Install

```bash
openclaw plugins install openclaw-plugin-markdown-strip
```

## Configuration

By default, the plugin strips Markdown on **iMessage** only. To add more channels:

```jsonc
// ~/.openclaw/openclaw.json
{
  "plugins": {
    "entries": {
      "markdown-strip": {
        "enabled": true,
        "config": {
          "channels": ["imessage", "signal", "whatsapp"]
        }
      }
    }
  }
}
```

Available channel IDs: `imessage`, `signal`, `whatsapp`, `telegram`, `discord`, `slack`, `sms`, `irc`, `msteams`, `mattermost`, etc.

## What gets stripped

| Markdown | Result |
|----------|--------|
| `**bold**` | bold |
| `_italic_` | italic |
| `` `code` `` | code |
| ```` ```codeblock``` ```` | codeblock content |
| `### Header` | Header |
| `[text](url)` | text |
| `![alt](img)` | alt |
| `> blockquote` | blockquote |
| `- list item` | list item |
| `~~strikethrough~~` | strikethrough |
| `---` | *(removed)* |
| `\*escaped\*` | *escaped* |

Ordered lists (`1. item`) are preserved as-is since they're readable in plaintext. Snake_case identifiers are not touched.

## How it works

The plugin registers a `message_sending` hook that fires before each outgoing message. If the target channel is in the configured list, it runs the message through a series of regex replacements that strip Markdown syntax while preserving the readable text content.

## Development

```bash
# Run tests
npm test

# Link for local development
openclaw plugins install -l .
```

## License

MIT
channels

Comments

Sign in to leave a comment

Loading comments...