Skip to content

tiddly-gittly/md-to-tid

Repository files navigation

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.

About

Transform markdown to tiddlywiki5 wikitext syntax. Using unifiedjs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published