|
1 | | - |
2 | | -# VEditor |
3 | | - |
4 | | -VEditor is plugin for MantisBT using TinyMCE as bugnote editor. |
5 | | -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. |
6 | | - |
7 | | - |
8 | | -## Features |
9 | | - |
10 | | -- Enables you to paste a sceneshot directly from the clipboard |
11 | | -- Converts pasted images as issue attachments |
12 | | -- Allows rich formatting of text and tables (HTML), including MantisBT css classes |
13 | | -- Enables TinyMCE in comments, issue descriptions and custom fields (memo) |
14 | | -- Support for TinyMCE plugins (separate set for developer and reporter) |
15 | | -- Support for Light/dark mode |
16 | | -- Multi-language support |
17 | | - |
18 | | -This plugin requires MantisBT 2.1.0. It was tested on 2.26.1, PHP 8.3.X |
19 | | - |
20 | | -## Installation |
21 | | - |
22 | | -1. Download and unzip the plugin files to your computer |
23 | | -2. Upload the plugin directory and the files into <yourMantisRoot>/plugins. Directory should be named VEditor (remove version number) and contains VEditor.php file |
24 | | -3. In MantisBT go to page Manage > Manage Plugins. You will see a list of installed and currently not installed plugins |
25 | | -4. Click the **Uninstall** button to uninstall standard MantisBT Formatting plugin |
26 | | -5. Click the Install button to install VEditor plugin. |
27 | | - |
28 | | -### Update config_inc.php |
29 | | -If you want paste images from clipboard you should enable blob(base64) images in your content security policy |
30 | | -In your config_inc.php add line |
31 | | - |
32 | | - |
33 | | -```php |
34 | | -$g_custom_headers = array( 'Content-Security-Policy: ' . "default-src *; img-src 'self' blob: data:; script-src 'self'; style-src 'self' 'unsafe-inline' *" ); |
35 | | -``` |
36 | | - |
37 | | -### Update bug_api.php |
38 | | -If you want to save images as bug attachments (recommended) you should patch MantisBT code. |
39 | | -It is required for hide files generated from TinyMCE. |
40 | | -Open core/bug_api.php file and find bug_get_attachments function. |
41 | | -Add marked lines at the beginning code (around 1900 line code) |
42 | | - |
43 | | -```php |
44 | | -function bug_get_attachments( $p_bug_id ) { |
45 | | - $p_bug_id = (int)$p_bug_id; |
46 | | - |
47 | | - global $g_cache_bug_attachments; |
48 | | - if( isset( $g_cache_bug_attachments[$p_bug_id] ) ) { |
49 | | - return $g_cache_bug_attachments[$p_bug_id]; |
50 | | - } |
51 | | - |
52 | | -#VEditor begin |
53 | | - if (function_exists('veditor_bug_get_attachments')) { |
54 | | - return veditor_bug_get_attachments($p_bug_id); |
55 | | - } |
56 | | -#VEditor end |
57 | | - |
58 | | - db_param_push(); |
59 | | -``` |
60 | | -## Configuration |
61 | | - |
62 | | -See config() method for plugin default configuration. |
63 | | - |
64 | | - |
65 | | -## Authors |
66 | | - |
67 | | -- [Ryszard Pydo](https://www.github.com/pysiek634) |
68 | | - |
69 | | - |
70 | | -## License |
71 | | - |
72 | | -This plugin is licenced under [MIT](https://choosealicense.com/licenses/mit/) |
73 | | - |
| 1 | + |
| 2 | +# VEditor |
| 3 | + |
| 4 | +VEditor is plugin for MantisBT using TinyMCE as bugnote editor. |
| 5 | +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. |
| 6 | + |
| 7 | + |
| 8 | +## Features |
| 9 | + |
| 10 | +- Enables you to paste a sceneshot directly from the clipboard |
| 11 | +- Converts pasted images as issue attachments |
| 12 | +- Allows rich formatting of text and tables (HTML), including MantisBT css classes |
| 13 | +- Enables TinyMCE in comments, issue descriptions and custom fields (memo) |
| 14 | +- Support for TinyMCE plugins (separate set for developer and reporter) |
| 15 | +- Support for Light/dark mode |
| 16 | +- Multi-language support |
| 17 | + |
| 18 | +This plugin requires MantisBT 2.23.0. It was tested on 2.26.1-2.28.0, PHP 8.3.X |
| 19 | + |
| 20 | +## Installation |
| 21 | + |
| 22 | +1. Download and unzip the plugin files to your computer |
| 23 | +2. Upload the plugin directory and the files into <yourMantisRoot>/plugins. Directory should be named VEditor (remove version number) and contains VEditor.php file |
| 24 | +3. In MantisBT go to page Manage > Manage Plugins. You will see a list of installed and currently not installed plugins |
| 25 | +4. Click the **Uninstall** button to uninstall standard MantisBT Formatting plugin |
| 26 | +5. Click the Install button to install VEditor plugin. |
| 27 | + |
| 28 | +### Update config_inc.php |
| 29 | +If you want paste images from clipboard you should enable blob(base64) images in your content security policy |
| 30 | +In your config_inc.php add line |
| 31 | + |
| 32 | + |
| 33 | +```php |
| 34 | +$g_custom_headers = array( 'Content-Security-Policy: ' . "default-src *; img-src 'self' blob: data:; script-src 'self'; style-src 'self' 'unsafe-inline' *" ); |
| 35 | +``` |
| 36 | + |
| 37 | +### Update bug_api.php |
| 38 | +If you want to save images as bug attachments (recommended) you should patch MantisBT code. |
| 39 | +It is required for hide attachments generated from TinyMCE. |
| 40 | +Open core/bug_api.php file and find bug_get_attachments function. |
| 41 | +Add marked lines at the beginning code (around 1900 line code) |
| 42 | + |
| 43 | +```php |
| 44 | +function bug_get_attachments( $p_bug_id ) { |
| 45 | + $p_bug_id = (int)$p_bug_id; |
| 46 | + |
| 47 | + global $g_cache_bug_attachments; |
| 48 | + if( isset( $g_cache_bug_attachments[$p_bug_id] ) ) { |
| 49 | + return $g_cache_bug_attachments[$p_bug_id]; |
| 50 | + } |
| 51 | + |
| 52 | +#VEditor begin |
| 53 | + if (function_exists('veditor_bug_get_attachments')) { |
| 54 | + return veditor_bug_get_attachments($p_bug_id); |
| 55 | + } |
| 56 | +#VEditor end |
| 57 | + |
| 58 | + db_param_push(); |
| 59 | +``` |
| 60 | +## Configuration |
| 61 | + |
| 62 | +See config() method for plugin default configuration. |
| 63 | + |
| 64 | + |
| 65 | +## Authors |
| 66 | + |
| 67 | +- [Ryszard Pydo](https://www.github.com/pysiek634) |
| 68 | + |
| 69 | + |
| 70 | +## License |
| 71 | + |
| 72 | +This plugin is licenced under [MIT](https://choosealicense.com/licenses/mit/) |
| 73 | + |
0 commit comments