Skip to content

Commit e3329f9

Browse files
committed
first commit
0 parents  commit e3329f9

File tree

5 files changed

+105
-0
lines changed

5 files changed

+105
-0
lines changed

Assets/js/mermaid.min.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/js/start_mermaid.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
KB.on('dom.ready', function() {
2+
mermaid.initialize({ startOnLoad: true });
3+
});

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Eugen Neuber
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Plugin.php

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
3+
namespace Kanboard\Plugin\AddMermaid;
4+
5+
use Kanboard\Core\Plugin\Base;
6+
7+
class Plugin extends Base
8+
{
9+
10+
public function initialize()
11+
{
12+
$this->hook->on('template:layout:js', array('template' => 'plugins/AddMermaid/Assets/js/mermaid.min.js'));
13+
$this->hook->on('template:layout:js', array('template' => 'plugins/AddMermaid/Assets/js/start_mermaid.js'));
14+
}
15+
16+
public function getPluginName()
17+
{
18+
return 'AddMermaid';
19+
}
20+
21+
public function getPluginDescription()
22+
{
23+
return t('Add rendering for mermaid.js diagrams.');
24+
}
25+
26+
public function getPluginAuthor()
27+
{
28+
return 'Eugen Neuber';
29+
}
30+
31+
public function getPluginVersion()
32+
{
33+
return '0.1.0';
34+
}
35+
36+
public function getCompatibleVersion()
37+
{
38+
return '>=1.0.48';
39+
}
40+
41+
public function getPluginHomepage()
42+
{
43+
return 'https://github.com/euneuber/AddMermaid';
44+
}
45+
46+
}

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# AddMermaid
2+
3+
Add mermaid.js redering for kanboard markdown texts.
4+
5+
Author
6+
------------
7+
- Eugen Neuber
8+
- License MIT
9+
10+
Requirements
11+
------------
12+
Kanboard >= v1.0.48
13+
Kanboard installed at a web server.
14+
You can find the download at [kanboard.org](https://kanboard.org/)
15+
16+
Installation
17+
------------
18+
Install this plugin by cloning this repository into kanboard plugin directory:
19+
20+
```console
21+
cd $YOUR_KANBOARD_DOCUMENT_ROOT
22+
23+
git clone https://github.com/euneuber/AddMermaid.git plugins/AddMermaid
24+
```
25+
26+
Note: Plugin folder is case-sensitive.
27+
28+
### :star: If you like it, do not forget to give a star on GitHub!
29+
30+
:bug: Reporting Issues
31+
------------
32+
Please [create an issue](https://github.com/euneuber/AddMermaid/issues) for any bugs you've found.

0 commit comments

Comments
 (0)