VEditor is plugin for MantisBT using TinyMCE as bugnote editor. This allows you to paste screensots and use html code, e.g. bold text, colors or tables. It replace default textarea in bug reporting. This plugin replace standard MantisCoreFormatting.
This plugin requires MantisBT 2.1.0. It was tested on 2.26.1, PHP 8.3.X
If you want paste images from clipboard you should enable blob(base64) images in your content security policy
In your config_inc.php add line
$g_custom_headers = array( 'Content-Security-Policy: ' . "default-src *; img-src 'self' blob: data:; script-src 'self'; style-src 'self' 'unsafe-inline' *" );
If you want to save images as bug attachments (recommended) you should patch MantisBT code.
It is required for hide files generated from TinyMCE.
Open core/bug_api.php file and find bug_get_attachments function.
Add marked lines at the beginning code (around 1900 line code)
function bug_get_attachments( $p_bug_id ) {
$p_bug_id = (int)$p_bug_id;
global $g_cache_bug_attachments;
if( isset( $g_cache_bug_attachments[$p_bug_id] ) ) {
return $g_cache_bug_attachments[$p_bug_id];
}
#VEditor begin
if (function_exists('veditor_bug_get_attachments')) {
return veditor_bug_get_attachments($p_bug_id);
}
#VEditor end
db_param_push();
See config() method for plugin default configuration.
This plugin is licenced under MIT