The plugin includes the editor files on pages whose script is named tickets.php or ticket.php (ticket views), and on ajax.php calls whose URL contains ticket. AJAX requests themselves get no assets. The plugin does not distinguish between the staff area and the client portal: it only checks the script name.
It takes over input fields named response (reply), note (internal note) and message (message). Other fields with the class richtext get a compact editor: toolbar without the image button, without preview and without image upload.
Above the input field (with Allow Format Switching on) a Format selector with Markdown and HTML appears. Switching to HTML brings back the normal osTicket editor, switching to Markdown shows the toolbar and preview. The editor sends the chosen format with the form as a hidden format field.
| Button | Markdown | Shortcut | Effect |
|---|---|---|---|
| Bold | **text** |
Ctrl+B | Wraps the selection |
| Italic | *text* |
Ctrl+I | Wraps the selection |
| Heading | # to ###### |
Ctrl+H | Raises the level from 1 to 6 with every click, then back to 1 |
| Link | [text](URL) |
Ctrl+K | Asks for the URL in a dialog |
| Inline code | `code` |
Wraps the selection | |
| Code block | ```language |
Asks for the programming language in a dialog | |
| List | - item |
Bullet list, one line per item | |
| Numbered list | 1. item |
Numbering from 1 | |
| Quote | > text |
Quote per line | |
| Rule | --- |
Horizontal rule | |
| Image |  |
Opens the file dialog for an image upload |
On a Mac, Cmd applies instead of Ctrl. The dialogs for link and code block are labeled in German in the plugin (URL eingeben:, Programmiersprache (optional):).
The preview appears below the input field. It is rendered on the server 500 ms after the last keystroke via the endpoint api/markdown-preview.php. If the server does not answer correctly, a simple converter in the browser renders a simplified preview. This fallback preview does not know tables or strikethrough syntax.
On narrow screens the Toggle Preview button in the toolbar shows and hides the preview.
In Markdown mode (not in the compact editor) images can be inserted in three ways:
| Way | Steps |
|---|---|
| Drag and drop | Drag an image file into the editor |
| Clipboard | Paste an image or screenshot with Ctrl+V |
| Toolbar | Click the image button and pick a file in the file dialog |
JPEG, PNG, GIF, WebP and BMP are allowed. SVG is not allowed. The plugin uploads the image through the osTicket draft API ajax.php/draft/.../attach, inserts the placeholder ![Uploading image-1...]() during the upload and replaces it afterwards with . The alt text is the file name without its extension, with the characters [, ], ( and ) removed. As a URL the plugin only accepts http://, https:// and file.php?.... Anything else is replaced with #invalid-url.
The upload needs the draft context of the input field (attribute
data-draft-namespaceordata-draft-id) and a CSRF token on the page. Without a draft context the upload is not available, without a CSRF token it aborts.
When you pick a canned response from the #cannedResp selector in Markdown mode, the plugin loads it through the osTicket AJAX interface and converts the HTML to Markdown in the browser. In HTML mode the standard osTicket behavior stays. Attachments of the canned response are taken over in both modes.
| HTML element | Markdown |
|---|---|
h1 to h6 |
# to ###### |
strong, b |
**bold** |
em, i |
*italic* |
a |
[text](URL) |
img |
 |
blockquote |
> quote |
ul, ol |
- item, 1. item |
pre, code |
code block, inline code |
hr |
--- |
The canned responses in the database stay unchanged.
Rendering uses Parsedown (version 1.7.4 according to composer.lock) in SafeMode.
# Heading 1
## Heading 2
**bold**, *italic*, ~~strikethrough~~, `inline code`
- Bullet list
- Second item
1. Numbered list
2. Second item
> Quote
[Link text](https://example.com)

---
```php
echo "Hello world";
```
javascript:) are neutralized by SafeMode and by Format::sanitize(). See Technical details.pre/code.Entries with the format markdown are rendered by the class MarkdownThreadEntryBody wherever osTicket outputs the entry through its thread entry classes: the agents' ticket view, the client portal, PDF export and emails. In the PDF export the plugin replaces images with an http(s) URL with the text [Image]. Search uses the HTML content converted to text.
How Markdown gets into outgoing emails is described on the Technical details page.