md-to-tid
v0.0.4
Published
Transform markdown to tiddlywiki5 wikitext syntax.
Downloads
8
Readme
Markdown to Tid
Transform markdown to tiddlywiki5 wikitext syntax. Using unifiedjs.
Basic features
-
to*
1.
to#
#
to!
Usage
Website demo: https://tiddly-gittly.github.io/md-to-tid/
Programmatic usage
Get md data from your wiki and transform it:
import { md2tid } from 'md-to-tid';
const prevMDText = $tw.wiki.getTiddlerText(title);
const tidText = md2tid(prevMDText);
$tw.wiki.setText(title, 'text', undefined, tidText);
$tw.wiki.setText(title, 'type', undefined, 'text/vnd.tiddlywiki');
Or if you have a MDAST: See Our test case for details.