@hywax/mdc-tiptap 0.0.2 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -24
- package/dist/index.cjs +559 -537
- package/dist/index.d.cts +51 -30
- package/dist/index.d.mts +51 -30
- package/dist/index.d.ts +51 -30
- package/dist/index.mjs +558 -529
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,37 +23,15 @@ npm install @hywax/mdc-tiptap -D
|
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
|
-
### `mdcToTiptap`
|
|
27
|
-
|
|
28
26
|
```ts
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
const tiptap = await mdcToTiptap(markdown) // AST Tiptap
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### `tiptapToMdc`
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
|
-
import { tiptapToMdc } from '@hywax/mdc-tiptap'
|
|
38
|
-
|
|
39
|
-
const mdc = await tiptapToMdc(tiptap) // AST MDC
|
|
40
|
-
```
|
|
41
|
-
### `tiptapToMarkdown`
|
|
27
|
+
import { createMarkdown } from '@hywax/mdc-tiptap'
|
|
42
28
|
|
|
43
|
-
|
|
44
|
-
import { tiptapToMarkdown } from '@hywax/mdc-tiptap'
|
|
29
|
+
const { tiptapToMarkdown, markdownToTiptap } = createMarkdown()
|
|
45
30
|
|
|
46
31
|
const markdown = await tiptapToMarkdown(tiptap) // Markdown string
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
```ts
|
|
50
|
-
import { markdownToTiptap } from '@hywax/mdc-tiptap'
|
|
51
|
-
|
|
52
32
|
const tiptap = await markdownToTiptap(markdown) // AST Tiptap
|
|
53
33
|
```
|
|
54
34
|
|
|
55
|
-
### `markdownToTiptap`
|
|
56
|
-
|
|
57
35
|
## License
|
|
58
36
|
|
|
59
37
|
MDC to Tiptap is open sourced software licensed under the [MIT license](https://github.com/hywax/mdc-tiptap/blob/main/LICENSE.md).
|