md-to-tid
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i md-to-tid

Weekly Downloads

6

Version

0.0.4

License

GPL-3.0

Unpacked Size

1.44 MB

Total Files

56

Last publish

Collaborators

  • linonetwo012