HackMD is a realtime, multi-platform collaborative markdown knowledge base.
You can write notes with other people on your desktop, tablet or even on the phone.
Please report new issues in GitHub.
If you need instant help, please send us a Facebook message.
Thank you very much!
Desktop & Tablet
Edit: See only the editor.
View: See only the result.
Both: See both in split view.
Mobile
View: See only the result.
Edit: See only the editor.
You can upload an image simply by clicking on the camera button .
Alternatively, you can drag-n-drop an image into the editor. Even pasting images works!
Dragging and pasting will automatically upload the image to HackMD, nothing to worry.
Free users can upload images up to 1 MB. Paid users can upload 20 MB.
Press the share button on the top right of the menu and click Copy button to copy the note URL link to your clipboard.
To publish and customize the note URL with permalink, please read How to Publish a Note with Permalink.
Currently, you can save to Dropbox , Google Drive, Gist or save an .md
file and .html
locally.
Similarly to the save feature, you can also import an .md
or .html
file from Dropbox , Google Drive, Gist or import content from your clipboard , and that can parse some HTML which might be useful
It is possible to change permissions to a note through the button on the share button on the top right of the menu, click the button and you will see the Sharing menu.
For read and write permissions, you can either choose: Owners, Signed-in users or Everyone.
For commenting permission, please click More in the sharing menu and choose either: Forbidden, Owners, Signed-in users or Everyone. You even can disable the commenting feature through the toggle to the right of the commenting label.
Only the owners of the note can change above permissions.
To invite specific user to a note, please read Invite Others to a Private Note.
Notes can be embedded using iframe as follows:
<iframe width="100%" height="500" src="https://hackmd.io/features" frameborder="0"></iframe>
Or you can use embed syntax to include a note seamlessly, please read Embedding another note.
You can use a special syntax to organize your note into slides.
After that, you can use the Slide Mode to make a presentation.
Visit the above link for details.
You can make your notes into a book.
List your links in order or nest them.
Then use the Book Mode to make a collection.
Visit the above link for details.
You can look at the bottom right section of the view area, there is a ToC button .
Pressing that button will show you a current Table of Contents, and will highlight which section you're at.
If the view area is wide enough, to ToC will show directly at the right section of the view area.
ToCs support up to three header levels.
Every header will automatically add a url link on the left side.
You can hover and click to anchor on it.
Just like Sublime text, which is pretty quick and convenient.
For more infomation, see here.
This editor provides full auto-complete hints in markdown.
:
to show hints.```
and plus a character to show hint. ```#
to show hint.[]
to show hint.{}
to show hint.!
to show hint.This will take the first level 1 header as the note title.
Using tags as follows, the specified tags will show in your note list.
features
cool
updated
You can provide advanced note information to set the browser behavior (visit above link for details):
Use the syntax [TOC]
to embed table of content into your note.
You can type any emoji like this
See full emoji list here.
We support many programming languages, use the auto complete function to see the entire list.
var s = "JavaScript syntax highlighting";
alert(s);
function $initHighlight(block, cls) {
try {
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) +
' class=""';
} catch (e) {
/* handle exception */
}
for (var i = 0 / 2; i < classes.length; i++) {
if (checkCondition(classes[i]) === undefined)
return /\d+[\s/]/g;
}
}
If you want line numbers, type
=
after specifying the code block languages.
Also, you can specify the start line number.
Like below, the line number starts from 101:
var s = "JavaScript syntax highlighting";
alert(s);
function $initHighlight(block, cls) {
try {
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) +
' class=""';
} catch (e) {
/* handle exception */
}
for (var i = 0 / 2; i < classes.length; i++) {
if (checkCondition(classes[i]) === undefined)
return /\d+[\s/]/g;
}
}
Or you might want to continue the previous code block's line number, use
=+
var s = "JavaScript syntax highlighting";
alert(s);
Sometimes you have a super long text without breaks. It's time to use
!
to wrap your code.
When you’re a carpenter making a beautiful chest of drawers, you’re not going to use a piece of plywood on the back.
Using the syntax below to specifiy your name, time and color to vary the blockquotes.
ChengHan WuSun, Jun 28, 2015 9:59 PMEven support the nest blockquotes!
ChengHan WuSun, Jun 28, 2015 10:00 PM
You can use write csv in the codeblock:
```csvpreview {header="true"}
firstName,lastName,email,phoneNumber
John,Doe,john@doe.com,0123456789
Jane,Doe,jane@doe.com,9876543210
James,Bond,james.bond@mi6.co.uk,0612345678
```
which rendered to:
firstName | lastName | phoneNumber | |
---|---|---|---|
John | Doe | john@doe.com | 0123456789 |
Jane | Doe | jane@doe.com | 9876543210 |
James | Bond | james.bond@mi6.co.uk | 0612345678 |
We use Papa Parse for parsing csv. The parsing option is given in braces: {}
, and multiple options are seperated by a space. e.g. {header="true" delimiter="."}
. Please read their documentation as reference.
Caution: this might be blocked by your browser if not using an https
URL.
You can render LaTeX mathematical expressions using MathJax, as on math.stackexchange.com, except the space after the start $
and the space before the end $
are not allowed in the inline math:
The Gamma function satisfying \(\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N\) is via the Euler integral
For block level math, please give $$
and a line break before and after your math formula:
\[ x = {-b \pm \sqrt{b^2-4ac} \over 2a}. \]
\[ \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. \]
More information about LaTeX mathematical expressions here.
You can render sequence diagrams like this:
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
Note left of Alice: Alice responds
Alice->Bob: Where have you been?
Flow charts can be specified like this:
st=>start: Start
e=>end: End
op=>operation: My Operation
op2=>operation: lalala
cond=>condition: Yes or No?
st->op->op2->cond
cond(yes)->e
cond(no)->op2
digraph hierarchy {
nodesep=1.0 // increases the separation between nodes
node [color=Red,fontname=Courier,shape=box] //All nodes will this shape and colour
edge [color=Blue, style=dashed] //All the lines look like this
Headteacher->{Deputy1 Deputy2 BusinessManager}
Deputy1->{Teacher1 Teacher2}
BusinessManager->ITManager
{rank=same;ITManager Teacher1 Teacher2} // Put them on the same level
}
gantt
title A Gantt Diagram
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
anther task : 24d
X:1
T:Speed the Plough
M:4/4
C:Trad.
K:G
|:GABc dedB|dedB dedB|c2ec B2dB|c2A2 A2BA|
GABc dedB|dedB dedB|c2ec B2dB|A2F2 G4:|
|:g2gf gdBd|g2f2 e2d2|c2ec B2dB|c2A2 A2df|
g2gf g2Bd|g2f2 e2d2|c2ec B2dB|A2F2 G4:|
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {"url": "https://vega.github.io/editor/data/barley.json"},
"mark": "bar",
"encoding": {
"x": {"aggregate": "sum", "field": "yield", "type": "quantitative"},
"y": {"field": "variety", "type": "nominal"},
"color": {"field": "site", "type": "nominal"}
}
}
-oO-*-
--o-o-
-o-oo-
-o-oO-
-oo-o-
-*O-o-
3
More information about sequence diagrams syntax here.
More information about flow charts syntax here.
More information about graphviz syntax here
More information about mermaid syntax here
More information about abc syntax here
More information about vega syntax here
More information about fretboard syntax here
Yes
This is a message
Watch out
Oh No!
You found me
You found me
# h1 Heading
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading
Enable typographer option to see result.
© © ® ® ™ ™ § § ±
test.. test… test… test?.. test!..
!!! ??? ,
Remarkable – awesome
"Smartypants, double quotes"
'Smartypants, single quotes'
This is bold text
This is bold text
This is italic text
This is italic text
Deleted text
lulala
Superscript: 19th
Subscript: H2O
Inserted text
Marked text
ruby base
Blockquotes can also be nested…
…by using additional greater-than signs right next to each other…
…or with spaces between arrows.
+
, -
, or *
1.
Start numbering with offset:
Inline code
Indented code
// Some comments
line 1 of code
line 2 of code
line 3 of code
Block code "fences"
Sample text here...
Syntax highlighting
var foo = function (bar) {
return bar++;
};
console.log(foo(5));
Option | Description |
---|---|
data | path to data files to supply the data that will be passed into templates. |
engine | engine to be used for processing templates. Handlebars is the default. |
ext | extension to be used for dest files. |
Right aligned columns
Option | Description |
---|---|
data | path to data files to supply the data that will be passed into templates. |
engine | engine to be used for processing templates. Handlebars is the default. |
ext | extension to be used for dest files. |
Left aligned columns
Option | Description |
---|---|
data | path to data files to supply the data that will be passed into templates. |
engine | engine to be used for processing templates. Handlebars is the default. |
ext | extension to be used for dest files. |
Center aligned columns
Option | Description |
---|---|
data | path to data files to supply the data that will be passed into templates. |
engine | engine to be used for processing templates. Handlebars is the default. |
ext | extension to be used for dest files. |
link text
link with title
Autoconverted link https://github.com/nodeca/pica
Like links, Images also have a footnote style syntax
With a reference later in the document defining the URL location:
Show the image with given size
Footnote 1 link[1].
Footnote 2 link[2].
Inline footnote[3] definition.
Duplicated footnote reference[2:1].
Definition 1
with lazy continuation.
Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
Compact style:
This is an HTML abbreviation example.
It converts "HTML", but keeps intact partial entries like "xxxHTMLyyy" and so on.