composer.json declares >=7.4, but the code uses PHP 8.0 syntax)include/class.thread.php, include/.htaccess and the api/ directory (see below)Option 1: release ZIP (recommended)
markdown-support folder to include/plugins/ in your osTicket directory.The ZIP contains the runtime dependency Parsedown in the vendor/ folder.
Option 2: Git clone with Composer
cd /path/to/osticket/include/plugins
git clone https://github.com/markus-michalski/osticket-markdown-support.git markdown-support
cd markdown-support
composer install --no-dev
The plugin loads
vendor/autoload.phpon startup. In a Git checkout this folder does not exist until you runcomposer install, and the plugin cannot start.
The target path is include/plugins/markdown-support/ with plugin.php, class.MarkdownPlugin.php and config.php directly inside.
On activation the following happens:
Auto-created singleton instance).include/.htaccess that allow static files (js, css, images, fonts) and PHP files under plugins/.markdown-preview.php to api/markdown-preview.php (the live preview endpoint).include/class.thread.php is extended with a case 'markdown':. Before that the plugin creates the backup include/class.thread.php.markdown-backup.The settings are described on the Configuration page.
A browser tab that is already open only gets the editor after the page is reloaded.
Replace the folder include/plugins/markdown-support/ with the new version. On the next start the plugin compares the stored installed_version with the version in plugin.php. If it is older or empty, the plugin updates the .htaccess rules, copies the preview endpoint again and stores the new version.
The core patch in include/class.thread.php belongs to osTicket and is lost when an osTicket update replaces the file. The plugin behaves as follows:
case 'markdown': and patches the new file again. If a backup .markdown-backup already exists, it does not overwrite it. The backup then still comes from the file of the old osTicket version.include/class.thread.php and deletes it. That would replace the core file of the new osTicket version with the old one.case 'markdown': and does not create a new backup.Therefore deactivate the plugin before the osTicket update. This restores the original file and deletes the backup. Then apply the osTicket update and activate the plugin again. It then creates a fresh backup of the new file and patches it.
include/class.thread.php from the backup (and deletes the backup), removes api/markdown-preview.php and removes its rules from include/.htaccess.include/plugins/markdown-support/.The plugin does not delete any database data. Existing entries keep the format markdown in the format column and their Markdown text. How osTicket displays such entries without the plugin is decided by the osTicket core.