This is a plugin adding support for non-standard Markdown syntax for less needed and/or more rare inline features for Obsidian.
The repo depends on the latest plugin API (obsidian.d.ts) in Typescript Definition format, which contains TSDoc comments describing what it does.
At the moment, the plugin by default adds the following elements:
- insertion:
++added text++
as<ins style="color:green">added text</ins>
- subscript:
H~2~O
asH<sub>2</sub>O
- superscript:
a^2^
asa<sup>2</sup>
- underline:
..Underline..
as<span style="text-decoration: underline">Underline</span>
- small caps:
^^Small Caps^^
as<span style="font-variant:small-caps">Small Caps</span>
- Centered text:
->center<-
as<center>center</center>
- “Discord-style” spoiler tag:
||spoiler||
rendered as a “censored” text
Note
Compatibility with other Markdown flavours: All currently implemented tokens with the sole exception of Discord-style spoiler, can be safely replaced with a corresponding HTML notation and inline styles.
Warning
At the time of developing this project, the Obsidian API is still in early alpha and is subject to change at any time!
- Clone this repo to a local development folder. For convenience, you can place this folder in your
.obsidian/plugins/obsidian-extended-syntax
folder. - Install NodeJS, then run
npm i
in the command line under your repo folder. - Run
npm run dev
to compile your plugin frommain.ts
tomain.js
. - Make changes to
src/main.ts
(or create new.ts
files). Those changes should be automatically compiled intomain.js
. - Reload Obsidian to load the new version of your plugin.
- Enable plugin in settings window.
- For updates to the Obsidian API run
npm update
in the command line under your repo folder.
- Create an empty folder (named for example
obsidian-extended-syntax
) in yourVaultFolder/.obsidian/plugins/
folder. - Copy over the compiled
main.js
,styles.css
,manifest.json
to the created folder.