Skip to content

A plugin to render asciidoc blocks in Obsidian, initially asciidoc tables

Notifications You must be signed in to change notification settings

getawaywithrmdir/obsidian-asciidoc-blocks

 
 

Repository files navigation

Obsidian AsciiDoc Blocks Plugin

This is a plugin to render AsciiDoc blocks in Obsidian, initially focused on tables. 'Cause markdown tables are so limited!

Examples

Headerless table (without grid and frames)

Markdown

Result

```asciidoc-table
[frame="none", grid="none", cols="^3,^1,^2"]
|===
| 2 × 1 | = | 2
| 2 × 2 | = | 4
| 2 × 3 | = | 6
|===
```

multiplication table

CSV Table

Markdown

Result

```asciidoc-table
[%header, format=csv]
|===
Artist, Track, Genre
Baauer, Harlem Shake, Hip Hop
The Lumineers, Ho Hey, Folk Rock
|===

```

csv table

Span lines and columns

Markdown

Result

```asciidoc-table
|===
| Column 1 | Column 2 | Column 3

3+| colspan="3" - full line

.2+| rowspan="2" - two lines
| Line 2 - Column 2
| Line 2 - Column 3
| Line 3 - Column 2
| Line 3 - Column 3

| Line 4 - Column 1
2.2+| rowspan="2" colspan="2" - two lines and two columns
| Line 5 - Column 1
|===
```

span table

💡
For more information about AsciiDoc Tables.

IMPORTANT

At the moment any AsciiDoc feature might work, but there isn’t any warranty and support! I hope in the future I could support other features officially!

⚠️
Maybe I’ll restrain asciidoc-table for only support tables and create another unsupported block: asciidoc-raw.

Thanks

  • The first inspiration (and some code) came from Obsidian Admonition, thanks @valentine195;

  • So many thanks, @francbreno for introducing me to Obsidian and spending some time discussing the idea of this plugin.

About

A plugin to render asciidoc blocks in Obsidian, initially asciidoc tables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 38.8%
  • TypeScript 32.8%
  • JavaScript 28.4%