Skip to content

Commit cec3c45

Browse files
committed
Update features.md
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
1 parent 1adf122 commit cec3c45

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

public/docs/features.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,30 @@ When you’re a carpenter making a beautiful chest of drawers, you’re not goin
208208
> > Even support the nest blockquotes!
209209
> > [name=ChengHan Wu] [time=Sun, Jun 28, 2015 10:00 PM] [color=red]
210210
211+
### Render CSV as table
212+
213+
You can use write csv in the codeblock:
214+
215+
~~~md
216+
```csvpreview {header="true"}
217+
firstName,lastName,email,phoneNumber
218+
John,Doe,john@doe.com,0123456789
219+
Jane,Doe,jane@doe.com,9876543210
220+
James,Bond,james.bond@mi6.co.uk,0612345678
221+
```
222+
~~~
223+
224+
which rendered to:
225+
226+
```csvpreview {header="true"}
227+
firstName,lastName,email,phoneNumber
228+
John,Doe,john@doe.com,0123456789
229+
Jane,Doe,jane@doe.com,9876543210
230+
James,Bond,james.bond@mi6.co.uk,0612345678
231+
```
232+
233+
We use [Papa Parse](https://www.papaparse.com/) 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](https://www.papaparse.com/docs#config) as reference.
234+
211235
## Externals
212236

213237
### YouTube

0 commit comments

Comments
 (0)