imatic-it / imatic-formatting
Installs: 504
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 1
Type:mantisbt-plugin
Requires
- php: ^7.4
- composer/installers: ^1.9
- league/commonmark: ^1.5.3
This package is auto-updated.
Last update: 2025-07-09 08:06:46 UTC
README
Imatic formatting
Purpose
Converts markdown into html.
Installation
composer config --unset platform.php
composer require imatic-it/imatic-formatting
Code highlighting
Following url was used to fetch code highlighting code: https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+clojure+markup-templating+php+sql
It can be disabled with:
$g_plugin_ImaticFormatting_include_prism = false;
ToastUI Editor (WYSIWYG)
This plugin integrates ToastUI Editor to provide a modern WYSIWYG and Markdown editor for text areas in MantisBT.
You can enable or configure the editor in your plugin config. Example:
public function config(): array { return [ 'include_prism' => true, 'toastui_editor' => [ 'enabled' => true, 'textAreas'=> [ 'description', 'additional_info', 'additional_information', 'bugnote_text' ], 'options' => [ 'initialEditType' => 'wysiwyg', // 'markdown' or 'wysiwyg' 'previewStyle' => 'tab', // 'tab' or 'vertical' 'height' => false, // Use false for default height 'useDefaultHTMLSanitizer' => true, 'useCommandShortcut' => true, 'useDefaultHTMLSanitizerOptions' => [ 'allowAttributes' => ['class', 'style'], 'allowTags' => ['a', 'b', 'i', 'strong', 'em', 'p', 'br', 'ul', 'ol', 'li', 'code', 'pre'], ], ], ] ]; }
Features
- Markdown and WYSIWYG editing mode
- Live preview (tab or vertical split)
- Custom HTML sanitization with DOMPurify
- Optional keyboard shortcuts
- Automatic synchronization with MantisBT text areas