Skip to content
Snippets Groups Projects
Commit 8cd2d637 authored by marihachi's avatar marihachi
Browse files

update readme

parent 73fb26c6
No related branches found
No related tags found
No related merge requests found
......@@ -12,20 +12,24 @@ TypeScript:
```ts
import * as mfm from 'rosee';
const input =
const inputText =
`<center>
Hello [tada everynyan! 🎉]
I'm @ai, An bot of misskey!
I'm @ai, A bot of misskey!
https://github.com/syuilo/ai
</center>`;
// parse a MFM text
const result = mfm.parse(input);
// Generate a MFM tree from the MFM text.
const mfmTree = mfm.parse(inputText);
// Generate a MFM tree from the MFM plain text.
const plainMfmTree = mfm.parsePlain('I like the hot soup :soup:​');
// Reverse to a MFM text from the MFM tree.
const text = mfm.toString(mfmTree);
// parse a MFM plain text
const plainResult = mfm.parsePlain('I like the hot soup :soup:​');
```
## Usage (Repository)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment