@knapsack/tiptap-utils 4.66.0 → 4.66.1--canary.0e279e6.0
Sign up to get free protection for your applications and to get access to all the features.
package/.turbo/turbo-build.log
CHANGED
package/.turbo/turbo-lint.log
CHANGED
package/dist/tiptap-utils.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tiptap-utils.d.ts","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"tiptap-utils.d.ts","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,WAAW,EAAQ,MAAM,wBAAwB,CAAC;AAE1E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmBjE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAEjE"}
|
package/dist/tiptap-utils.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { generateJSON } from '@tiptap/html';
|
1
|
+
import { generateJSON, generateHTML } from '@tiptap/html';
|
2
2
|
import { allExtensions, Link } from './tiptap-extensions.js';
|
3
3
|
export function convertHtmlToTipTapJson(html) {
|
4
4
|
return generateJSON(html, [
|
@@ -17,4 +17,7 @@ export function convertHtmlToTipTapJson(html) {
|
|
17
17
|
}),
|
18
18
|
]);
|
19
19
|
}
|
20
|
+
export function convertTipTapJsonToHtml(json) {
|
21
|
+
return generateHTML(json, allExtensions);
|
22
|
+
}
|
20
23
|
//# sourceMappingURL=tiptap-utils.js.map
|
package/dist/tiptap-utils.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tiptap-utils.js","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"tiptap-utils.js","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAe,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE1E,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,YAAY,CAAC,IAAI,EAAE;QACxB,0EAA0E;QAC1E,GAAG,aAAa,CAAC,MAAM,CACrB,CAAC,GAAG,EAAE,EAAE,CACN,CAAC;YACC,IAAI,CAAC,IAAI;YACT,2CAA2C;SAC5C,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CACvB;QACD,gFAAgF;QAChF,kBAAkB;QAClB,yDAAyD;QACzD,IAAI,CAAC,MAAM,CAAC;YACV,SAAS;gBACP,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;YAC9B,CAAC;SACF,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,IAAiB;IACvD,OAAO,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC3C,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@knapsack/tiptap-utils",
|
3
3
|
"description": "",
|
4
|
-
"version": "4.66.0",
|
4
|
+
"version": "4.66.1--canary.0e279e6.0",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
7
7
|
".": {
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"lint": "eslint ./"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@knapsack/utils": "4.66.0",
|
21
|
+
"@knapsack/utils": "4.66.1--canary.0e279e6.0",
|
22
22
|
"@tiptap/core": "^2.2.4",
|
23
23
|
"@tiptap/extension-blockquote": "^2.2.4",
|
24
24
|
"@tiptap/extension-bold": "^2.2.4",
|
@@ -52,9 +52,9 @@
|
|
52
52
|
"@tiptap/pm": "^2.2.4"
|
53
53
|
},
|
54
54
|
"devDependencies": {
|
55
|
-
"@knapsack/eslint-config-starter": "4.66.0",
|
56
|
-
"@knapsack/prettier-config": "4.66.0",
|
57
|
-
"@knapsack/typescript-config-starter": "4.66.0",
|
55
|
+
"@knapsack/eslint-config-starter": "4.66.1--canary.0e279e6.0",
|
56
|
+
"@knapsack/prettier-config": "4.66.1--canary.0e279e6.0",
|
57
|
+
"@knapsack/typescript-config-starter": "4.66.1--canary.0e279e6.0",
|
58
58
|
"@types/node": "^20.12.12",
|
59
59
|
"eslint": "^8.57.0",
|
60
60
|
"typescript": "^5.5.3"
|
@@ -68,5 +68,5 @@
|
|
68
68
|
"directory": "libs/tiptap-utils",
|
69
69
|
"type": "git"
|
70
70
|
},
|
71
|
-
"gitHead": "
|
71
|
+
"gitHead": "0e279e6081c0dbefb0aa0574d6e38a629d56f8c4"
|
72
72
|
}
|
package/src/tiptap-utils.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { generateJSON } from '@tiptap/html';
|
1
|
+
import { generateJSON, generateHTML } from '@tiptap/html';
|
2
|
+
|
2
3
|
import { allExtensions, JSONContent, Link } from './tiptap-extensions.js';
|
3
4
|
|
4
5
|
export function convertHtmlToTipTapJson(html: string): JSONContent {
|
@@ -21,3 +22,7 @@ export function convertHtmlToTipTapJson(html: string): JSONContent {
|
|
21
22
|
}),
|
22
23
|
]);
|
23
24
|
}
|
25
|
+
|
26
|
+
export function convertTipTapJsonToHtml(json: JSONContent): string {
|
27
|
+
return generateHTML(json, allExtensions);
|
28
|
+
}
|