MFM | Misskey Hub (original) (raw)
MFM, short for Markup language For Misskey, is a proprietary markup language that can be used in various locations in Misskey. Some of its syntax is compatible with Markdown and HTML.
Examples of places where MFM can be used
- The text of a note
- Content warning annotation
- Names of users
- User bios
Syntax
Mentions
@
+ username can be used to display a specific user.
For more information about mentions, see here.
@ai
@[email protected]
Hashtags
#
+ tag can be used to display a hashtag.
For more information about hashtags, see here.
#misskey
URL
URLs can be displayed.
https://example.com
Links
Specific parts of text can be displayed as a URL.
[example link](https://example.com)
You can hide the link preview by prefixing the link text with ?
.
?[example link](https://example.com)
Custom Emoji
Custom emoji can be displayed by surrounding the emoji name with colons.
For more information about custom emoji, see here.
:misskey:
Bold
Bolds text for emphasis.
**太字**
Shrink
Displays content smaller and thinner.
<small>MisskeyでFediverseの世界が広がります</small>
Quote
Displays content as a quote.
> MisskeyでFediverseの世界が広がります
Center align
Displays content centered.
<center>MisskeyでFediverseの世界が広がります</center>
Yomigana (Ruby characters)
Yomigana can be attached to text.
$[ruby Misskey ミスキー]
Code (Inline)
Displays syntax highlighting for code from programs inline.
`<: "Hello, world!"`
Code (Block)
Displays multi-line syntax highlighting for code from programs in a block.
By specifying the programming language by ID, you can apply syntax highlighting in that language. Available languages are:
- Languages supported by Shiki (200+)
- AiScript: Specify one of
aiscript
,ais
, oris
to use.
```ais
for (let i, 100) {
<: if ((i % 15) == 0) "FizzBuzz"
elif ((i % 3) == 0) "Fizz"
elif ((i % 5) == 0) "Buzz"
else i
}
### [Flip](#flip)
Flips content horizontally or vertically.
$[flip MisskeyでFediverseの世界が広がります] $[flip.v MisskeyでFediverseの世界が広がります] $[flip.h,v MisskeyでFediverseの世界が広がります]
### [Font](#font)
Sets the font to display content in.
$[font.serif MisskeyでFediverseの世界が広がります] $[font.monospace MisskeyでFediverseの世界が広がります] $[font.cursive MisskeyでFediverseの世界が広がります] $[font.fantasy MisskeyでFediverseの世界が広がります]
### [Blur](#blur)
Content can be blurred. When hovering the mouse over the content, it will be displayed clearly.
$[blur MisskeyでFediverseの世界が広がります]
### [Search](#search)
A search box can be displayed.
misskey 検索
### [Foreground and Background Color](#foreground-and-background-color)
The color of the foreground and background can be changed.
Colors are expressed using 3, 4, or 6 digit color codes.
$[fg.color=f00 赤字] $[bg.color=ff0 黄背景]
### [Border](#border)
Content can be surrounded borders. The borders can have various styles.
$[border.style=solid,width=4 Default]
$[border.style=hidden No border]
$[border.style=dotted,width=2 Dotted] $[border.style=dashed,width=2 Dashed] $[border.style=double,width=4 Double]
$[border.style=groove,width=4 Embossed A] $[border.style=ridge,width=4 Embossed B]
$[border.style=inset,width=4 Inset A] $[border.style=outset,width=4 Inset B]
$[border.color=d00 Border color] $[border.width=5 Border width]
$[border.radius=6,width=2 Border radius] [border.radius=5,width=2,color=888[border.radius=5,width=2,color=888 [border.radius=5,width=2,color=888[position.x=1.5 CSS] $[position.x=1.5 完全に理解した]] [border.radius=5,width=2,color=888,noclip[border.radius=5,width=2,color=888,noclip [border.radius=5,width=2,color=888,noclip[position.x=1.5 CSS] $[position.x=1.5 完全に理解した]]
### [Rotate](#rotate)
Rotate by a specified angle.
$[rotate.deg=30 misskey]
### [Shift Position](#shift-position)
The position can be shifted.
😏$[position.x=0.8,y=0.5 🍮]😀
### [Expand](#expand)
Displays enlarged text.
$[scale.x=4,y=2 🍮]
$[x2 x2] $[x3 x3] $[x4 x4]
### [Animation (Jelly)](#animation-jelly)
``` <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">[</mo><mi>j</mi><mi>e</mi><mi>l</mi><mi>l</mi><mi>y</mi><mtext>🍮</mtext><mo stretchy="false">]</mo></mrow><annotation encoding="application/x-tex">[jelly 🍮] </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">[</span><span class="mord mathnormal" style="margin-right:0.05724em;">j</span><span class="mord mathnormal">e</span><span class="mord mathnormal" style="margin-right:0.01968em;">ll</span><span class="mord mathnormal" style="margin-right:0.03588em;">y</span><span class="mord">🍮</span><span class="mclose">]</span></span></span></span>[jelly.speed=5s 🍮]
Animation (Tada)
Animation (Jump)
Animation (Bounce)
Animation (Spin)
$[spin.speed=5s 🍮]
Animation (Shake)
Animation (Twitch)
Rainbow
$[rainbow 色なし文字] <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">[</mo><mi>r</mi><mi>a</mi><mi>i</mi><mi>n</mi><mi>b</mi><mi>o</mi><mi>w</mi></mrow><annotation encoding="application/x-tex">[rainbow </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">[</span><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="mord mathnormal">ainb</span><span class="mord mathnormal">o</span><span class="mord mathnormal" style="margin-right:0.02691em;">w</span></span></span></span>[fg.color=f0f 色付き文字]]
Sparkle
$[sparkle 🍮]
Plain Text
Disable formatting of content.
<plain>**bold** @mention #hashtag `code` $[x2 🍮]</plain>
Information for developers
MFM parsing and rendering implementations are published as libraries, making it easy to incorporate MFM into clients.
- misskey-dev/mfm.js - JavaScript parser implementation
- mfm-renderer - Vue.js component
- mfm.kt - Kotlin parser implementation
- mfm_parser - Dart parser implementation
- mfm - Flutter rendering widget