1 Star 1 Fork 0

狗蛋 / nodebb-plugin-extended-markdown

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-2-Clause

nodebb-plugin-extended-markdown

A NodeBB plugin to extend markdown with new feature as tooltip, anchor, custom text header with background, color, code block with multiple languages and text align.

Installation

npm install nodebb-plugin-extended-markdown

Use

Color

A color picker is available in the composer:

Color picker The syntaxe is: %(#hexColorCode)[colored text]

Text align

You can align right by adding -| at the end of your paragraph. Likewise, you can align left a text by adding |- at the begin of your paragraph. Combining the two will center the text.

Align You can also justify your paragraph by adding |= at the begin and =| at the end.

/!\ Warning, text align is applied on the whole paragraph, so this will not work:

|-This text won't be centered because the ending tag is at the end of the line instead of the end of the paragraph.-|
This is still the same paragraph! You need to add two new lines to start a new paragraph

Tooltip

Tooltip allow you to add an overtext on another text. The syntax is °text°(tooltip text). You can use fa-info as text, in this case it will show the fa-info icon:

Tooltip

Anchor

All heading (h1, h2, etc., # in markdown) will automatically have an anchor of named using a slug (specials chars like :, , are removed, space are replaced by a -). You can then create a link to this anchor with the usual markdown syntax: [link name](#anchor-name)

Text heading with background

Specially added for Minecraft Forge France's tutorials, this one is a h2 with a background. You can add it with #anchor-name(title) where anchor-name is the name of the anchor. You can then create a link to this anchor with the usual markdown syntax: [link name](#anchor-name)

Heading with background

Currently the plugin haven't any option to change the color, but you can still override the css by adding:

.text-header {
    background-color: anotherColor;
}

in you nodebb custom css (admin/appearance/customise).

Grouped code

Also added for the needs of our tutorials, it allow to show multiples languages with nice tabs. The syntaxe is a bit complex:

===group
\```python
print("Hello world!")
\```
\```javascript
console.log("Hello world!")
\```
===

And the result:

Grouped code

You can add more than two languages.

Note

Enable to emphasise some element with a nice design

!!! info [Title]: A simple note

!!! important [Title]: An important note

!!! warning [Title]: A warning note
Can be in multiple line !

And the result;

Note

You can change the colors by override the css:

.admonition.important { 
    background: #c0f2e8;
}
.admonition.important .admonition-title {
    background: #7de8d2;
}
.admonition.info { 
    background: #c0dcf2;
}
.admonition.info .admonition-title { 
    background: #7dbae8;
}
.admonition.warning { 
    background:#f2d9c0;
}
.admonition.warning .admonition-title {
    background:#e8b37d;
}

in you nodebb custom css (admin/appearance/customise).

Spoiler New

A simple spoiler with the same syntax as Discord: ||hidden text||

Spoiler

BSD 2-Clause License Copyright (c) 2018, Minecraft Forge France development All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
NodeJS
BSD-2-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
NodeJS
1
https://gitee.com/qiyu123/nodebb-plugin-extended-markdown.git
git@gitee.com:qiyu123/nodebb-plugin-extended-markdown.git
qiyu123
nodebb-plugin-extended-markdown
nodebb-plugin-extended-markdown
master

搜索帮助