payload-richtext-tiptap 0.0.75 → 0.0.77
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/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.d.ts +33 -0
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.js +84 -0
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/index.js +1 -1
- package/dist/src/fields/TiptapEditor/extensions/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.d.ts +4 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.js +91 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.d.ts +3 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.js +34 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.d.ts +3 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.js +64 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.d.ts +3 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.js +34 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.d.ts +3 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.js +34 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ServersideTiptapBody.d.ts +7 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ServersideTiptapBody.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ServersideTiptapBody.js +87 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/ServersideTiptapBody.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.d.ts +3 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.js +34 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.d.ts +3 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.js +34 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/VideoBlockServerside.d.ts +52 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/VideoBlockServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/VideoBlockServerside.js +95 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/VideoBlockServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.d.ts +3 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.js +34 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/index.d.ts +12 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/index.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/index.js +13 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/index.js.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.d.ts +2 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.d.ts.map +1 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.js +23 -0
- package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +27 -40
package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Node } from "@tiptap/pm/model";
|
|
2
|
+
import { Editor } from "@tiptap/react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
interface VideoBlockViewProps {
|
|
5
|
+
editor: Editor;
|
|
6
|
+
getPos: () => number;
|
|
7
|
+
node: Node & {
|
|
8
|
+
attrs: {
|
|
9
|
+
src: string;
|
|
10
|
+
poster: string;
|
|
11
|
+
assetId: string;
|
|
12
|
+
playlistUrl?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
updateAttributes: (attrs: Record<string, string>) => void;
|
|
16
|
+
}
|
|
17
|
+
export type Playlist = {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
poster: string;
|
|
22
|
+
items: Item[];
|
|
23
|
+
};
|
|
24
|
+
export type Item = {
|
|
25
|
+
src: string;
|
|
26
|
+
type: string;
|
|
27
|
+
label: string;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
};
|
|
31
|
+
export declare const VideoBlockViewClientside: (props: VideoBlockViewProps) => React.JSX.Element;
|
|
32
|
+
export default VideoBlockViewClientside;
|
|
33
|
+
//# sourceMappingURL=VideoBlockViewClientside.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoBlockViewClientside.d.ts","sourceRoot":"","sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAmB,MAAM,eAAe,CAAC;AACxD,OAAO,KAAkD,MAAM,OAAO,CAAC;AAIvE,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,MAAM,CAAC;IACrB,IAAI,EAAE,IAAI,GAAG;QACX,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,CAAC;YACZ,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;YAChB,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;KACH,CAAC;IACF,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;CAC3D;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAAW,mBAAmB,sBA+FlE,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { NodeViewWrapper } from "@tiptap/react";
|
|
3
|
+
import React, { useEffect, useMemo, useRef } from "react";
|
|
4
|
+
import { cn } from "../../../lib/utils/index.js";
|
|
5
|
+
import VideoPlayer from "./videojs/VideoPlayer.js";
|
|
6
|
+
export const VideoBlockViewClientside = (props)=>{
|
|
7
|
+
const { node } = props;
|
|
8
|
+
const videoWrapperRef = useRef(null);
|
|
9
|
+
const { src, poster, playlistUrl, caption } = node.attrs;
|
|
10
|
+
const [playlistContent, setPlaylistContent] = React.useState();
|
|
11
|
+
const [error, setError] = React.useState();
|
|
12
|
+
useEffect(()=>{
|
|
13
|
+
async function getPlaylistContent() {
|
|
14
|
+
const res = await fetch(playlistUrl, {
|
|
15
|
+
cache: "no-cache"
|
|
16
|
+
});
|
|
17
|
+
return await res.json();
|
|
18
|
+
}
|
|
19
|
+
if (playlistUrl) {
|
|
20
|
+
try {
|
|
21
|
+
getPlaylistContent().then((data)=>{
|
|
22
|
+
setPlaylistContent(data);
|
|
23
|
+
}).catch((err)=>{
|
|
24
|
+
setError(err);
|
|
25
|
+
});
|
|
26
|
+
} catch (error) {
|
|
27
|
+
setError(error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, [
|
|
31
|
+
playlistUrl
|
|
32
|
+
]);
|
|
33
|
+
const wrapperClassName = cn(node.attrs.align === "left" ? "ml-0" : "ml-auto", node.attrs.align === "right" ? "mr-0" : "mr-auto", node.attrs.align === "center" && "mx-auto");
|
|
34
|
+
const videoJsOptions = useMemo(()=>{
|
|
35
|
+
if (playlistContent == undefined) return {};
|
|
36
|
+
if (playlistContent.items.some((item)=>item.type === "application/x-mpegURL" || item.type === "application/vnd.apple.mpegurl")) {
|
|
37
|
+
return {
|
|
38
|
+
sources: playlistContent.items.filter((item)=>item.type === "application/x-mpegURL" || item.type === "application/vnd.apple.mpegurl").map((item)=>({
|
|
39
|
+
src: item.src,
|
|
40
|
+
type: item.type,
|
|
41
|
+
label: item.label
|
|
42
|
+
})),
|
|
43
|
+
poster: playlistContent.poster
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
sources: playlistContent.items.map((item)=>({
|
|
48
|
+
src: item.src,
|
|
49
|
+
type: item.type,
|
|
50
|
+
label: item.label
|
|
51
|
+
})),
|
|
52
|
+
poster: playlistContent.poster
|
|
53
|
+
};
|
|
54
|
+
}, [
|
|
55
|
+
playlistContent
|
|
56
|
+
]);
|
|
57
|
+
return /*#__PURE__*/ _jsx(NodeViewWrapper, {
|
|
58
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
59
|
+
className: wrapperClassName,
|
|
60
|
+
style: {
|
|
61
|
+
width: node.attrs.width
|
|
62
|
+
},
|
|
63
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
64
|
+
contentEditable: false,
|
|
65
|
+
ref: videoWrapperRef,
|
|
66
|
+
children: [
|
|
67
|
+
error && /*#__PURE__*/ _jsx("div", {
|
|
68
|
+
children: error
|
|
69
|
+
}),
|
|
70
|
+
playlistContent && /*#__PURE__*/ _jsx(VideoPlayer, {
|
|
71
|
+
options: videoJsOptions
|
|
72
|
+
}),
|
|
73
|
+
caption && playlistContent?.title && /*#__PURE__*/ _jsx("caption", {
|
|
74
|
+
className: "text-center block text-sm text-gray-500",
|
|
75
|
+
children: playlistContent?.title
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
export default VideoBlockViewClientside;
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=VideoBlockViewClientside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"sourcesContent":["import { Node } from \"@tiptap/pm/model\";\nimport { Editor, NodeViewWrapper } from \"@tiptap/react\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport { cn } from \"../../../lib/utils/index.js\";\nimport VideoPlayer from \"./videojs/VideoPlayer.js\";\n\ninterface VideoBlockViewProps {\n editor: Editor;\n getPos: () => number;\n node: Node & {\n attrs: {\n src: string;\n poster: string;\n assetId: string;\n playlistUrl?: string;\n };\n };\n updateAttributes: (attrs: Record<string, string>) => void;\n}\n\nexport type Playlist = {\n id: string;\n title: string;\n description: string;\n poster: string;\n items: Item[];\n};\n\nexport type Item = {\n src: string;\n type: string;\n label: string;\n width: number;\n height: number;\n};\n\nexport const VideoBlockViewClientside = (props: VideoBlockViewProps) => {\n const { node } = props;\n const videoWrapperRef = useRef<HTMLDivElement>(null);\n const { src, poster, playlistUrl, caption } = node.attrs;\n const [playlistContent, setPlaylistContent] = React.useState<\n Playlist | undefined\n >();\n const [error, setError] = React.useState();\n\n useEffect(() => {\n async function getPlaylistContent() {\n const res = await fetch(playlistUrl, {\n cache: \"no-cache\",\n });\n return await res.json();\n }\n\n if (playlistUrl) {\n try {\n getPlaylistContent()\n .then((data) => {\n setPlaylistContent(data);\n })\n .catch((err) => {\n setError(err);\n });\n } catch (error) {\n setError(error);\n }\n }\n }, [playlistUrl]);\n\n const wrapperClassName = cn(\n node.attrs.align === \"left\" ? \"ml-0\" : \"ml-auto\",\n node.attrs.align === \"right\" ? \"mr-0\" : \"mr-auto\",\n node.attrs.align === \"center\" && \"mx-auto\"\n );\n\n const videoJsOptions = useMemo(() => {\n if (playlistContent == undefined) return {};\n\n if (\n playlistContent.items.some(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n ) {\n return {\n sources: playlistContent.items\n .filter(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n .map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n };\n }\n return {\n sources: playlistContent.items.map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n };\n }, [playlistContent]);\n return (\n <NodeViewWrapper>\n <div className={wrapperClassName} style={{ width: node.attrs.width }}>\n <div contentEditable={false} ref={videoWrapperRef}>\n {error && <div>{error}</div>}\n {/* <video\n controls\n className=\"block\"\n src={src}\n poster={poster}\n title=\"\"\n onClick={onClick}\n /> */}\n {playlistContent && <VideoPlayer options={videoJsOptions} />}\n {caption && playlistContent?.title && (\n <caption className=\"text-center block text-sm text-gray-500\">\n {playlistContent?.title}\n </caption>\n )}\n </div>\n </div>\n </NodeViewWrapper>\n );\n};\n\nexport default VideoBlockViewClientside;\n"],"names":["NodeViewWrapper","React","useEffect","useMemo","useRef","cn","VideoPlayer","VideoBlockViewClientside","props","node","videoWrapperRef","src","poster","playlistUrl","caption","attrs","playlistContent","setPlaylistContent","useState","error","setError","getPlaylistContent","res","fetch","cache","json","then","data","catch","err","wrapperClassName","align","videoJsOptions","undefined","items","some","item","type","sources","filter","map","label","div","className","style","width","contentEditable","ref","options","title"],"mappings":";AACA,SAAiBA,eAAe,QAAQ,gBAAgB;AACxD,OAAOC,SAAsBC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,QAAQ;AACvE,SAASC,EAAE,QAAQ,8BAA8B;AACjD,OAAOC,iBAAiB,2BAA2B;AAgCnD,OAAO,MAAMC,2BAA2B,CAACC;IACvC,MAAM,EAAEC,IAAI,EAAE,GAAGD;IACjB,MAAME,kBAAkBN,OAAuB;IAC/C,MAAM,EAAEO,GAAG,EAAEC,MAAM,EAAEC,WAAW,EAAEC,OAAO,EAAE,GAAGL,KAAKM,KAAK;IACxD,MAAM,CAACC,iBAAiBC,mBAAmB,GAAGhB,MAAMiB,QAAQ;IAG5D,MAAM,CAACC,OAAOC,SAAS,GAAGnB,MAAMiB,QAAQ;IAExChB,UAAU;QACR,eAAemB;YACb,MAAMC,MAAM,MAAMC,MAAMV,aAAa;gBACnCW,OAAO;YACT;YACA,OAAO,MAAMF,IAAIG,IAAI;QACvB;QAEA,IAAIZ,aAAa;YACf,IAAI;gBACFQ,qBACGK,IAAI,CAAC,CAACC;oBACLV,mBAAmBU;gBACrB,GACCC,KAAK,CAAC,CAACC;oBACNT,SAASS;gBACX;YACJ,EAAE,OAAOV,OAAO;gBACdC,SAASD;YACX;QACF;IACF,GAAG;QAACN;KAAY;IAEhB,MAAMiB,mBAAmBzB,GACvBI,KAAKM,KAAK,CAACgB,KAAK,KAAK,SAAS,SAAS,WACvCtB,KAAKM,KAAK,CAACgB,KAAK,KAAK,UAAU,SAAS,WACxCtB,KAAKM,KAAK,CAACgB,KAAK,KAAK,YAAY;IAGnC,MAAMC,iBAAiB7B,QAAQ;QAC7B,IAAIa,mBAAmBiB,WAAW,OAAO,CAAC;QAE1C,IACEjB,gBAAgBkB,KAAK,CAACC,IAAI,CACxB,CAACC,OACCA,KAAKC,IAAI,KAAK,2BACdD,KAAKC,IAAI,KAAK,kCAElB;YACA,OAAO;gBACLC,SAAStB,gBAAgBkB,KAAK,CAC3BK,MAAM,CACL,CAACH,OACCA,KAAKC,IAAI,KAAK,2BACdD,KAAKC,IAAI,KAAK,iCAEjBG,GAAG,CAAC,CAACJ,OAAU,CAAA;wBACdzB,KAAKyB,KAAKzB,GAAG;wBACb0B,MAAMD,KAAKC,IAAI;wBACfI,OAAOL,KAAKK,KAAK;oBACnB,CAAA;gBACF7B,QAAQI,gBAAgBJ,MAAM;YAChC;QACF;QACA,OAAO;YACL0B,SAAStB,gBAAgBkB,KAAK,CAACM,GAAG,CAAC,CAACJ,OAAU,CAAA;oBAC5CzB,KAAKyB,KAAKzB,GAAG;oBACb0B,MAAMD,KAAKC,IAAI;oBACfI,OAAOL,KAAKK,KAAK;gBACnB,CAAA;YACA7B,QAAQI,gBAAgBJ,MAAM;QAChC;IACF,GAAG;QAACI;KAAgB;IACpB,qBACE,KAAChB;kBACC,cAAA,KAAC0C;YAAIC,WAAWb;YAAkBc,OAAO;gBAAEC,OAAOpC,KAAKM,KAAK,CAAC8B,KAAK;YAAC;sBACjE,cAAA,MAACH;gBAAII,iBAAiB;gBAAOC,KAAKrC;;oBAC/BS,uBAAS,KAACuB;kCAAKvB;;oBASfH,iCAAmB,KAACV;wBAAY0C,SAAShB;;oBACzClB,WAAWE,iBAAiBiC,uBAC3B,KAACnC;wBAAQ6B,WAAU;kCAChB3B,iBAAiBiC;;;;;;AAOhC,EAAE;AAEF,eAAe1C,yBAAyB"}
|
|
@@ -45,6 +45,6 @@ export { Columns, Column } from "./MultiColumn/index.js";
|
|
|
45
45
|
export { AICommand } from "./AICommand/AICommand.js";
|
|
46
46
|
export { Twitter, Linkedin, Tiktok, Facebook, Instagram, Youtube } from "./SocialMedia/index.js";
|
|
47
47
|
export { Paragraph } from "./Paragraph/Paragraph.js";
|
|
48
|
-
export { InsideLinks } from "./InsideLinks/insideLinks.js";
|
|
48
|
+
export { InsideLinks } from "./InsideLinks/insideLinks.js"; // export * from "./serverside/index.js";
|
|
49
49
|
|
|
50
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/index.ts"],"sourcesContent":["// TODO: File causes circular dependency issue in ESLint\n/* eslint-disable */\nexport { StarterKit } from \"@tiptap/starter-kit\";\nexport { Highlight } from \"@tiptap/extension-highlight\";\nexport { CharacterCount } from \"@tiptap/extension-character-count\";\nexport { Underline } from \"@tiptap/extension-underline\";\nexport { Placeholder } from \"@tiptap/extension-placeholder\";\nexport { Emoji, gitHubEmojis } from \"@tiptap-pro/extension-emoji\";\nexport { TextAlign } from \"@tiptap/extension-text-align\";\nexport { TextStyle } from \"@tiptap/extension-text-style\";\nexport { FontFamily } from \"@tiptap/extension-font-family\";\nexport { Typography } from \"@tiptap/extension-typography\";\nexport { Color } from \"@tiptap/extension-color\";\nexport { FocusClasses as Focus } from \"@tiptap/extension-focus\";\nexport { Dropcursor } from \"@tiptap/extension-dropcursor\";\nexport { CollaborationCursor } from \"@tiptap/extension-collaboration-cursor\";\nexport { Subscript } from \"@tiptap/extension-subscript\";\nexport { TableOfContents } from \"@tiptap-pro/extension-table-of-contents\";\nexport { Superscript } from \"@tiptap/extension-superscript\";\nexport { CodeBlock } from \"@tiptap/extension-code-block\";\nexport { BulletList } from \"@tiptap/extension-bullet-list\";\nexport { OrderedList } from \"@tiptap/extension-ordered-list\";\nexport { Collaboration } from \"@tiptap/extension-collaboration\";\nexport { TaskItem } from \"@tiptap/extension-task-item\";\nexport { TaskList } from \"@tiptap/extension-task-list\";\nexport { FileHandler } from \"@tiptap-pro/extension-file-handler\";\n\nexport { Selection } from \"./Selection/Selection.js\";\nexport { Table, TableCell, TableHeader, TableRow } from \"./Table/index.js\";\nexport { HorizontalRule } from \"./HorizontalRule/HorizontalRule.js\";\nexport { Heading } from \"./Heading/Heading.js\";\nexport { Document } from \"./Document/Document.js\";\nexport { TrailingNode } from \"./TrailingNode/trailing-node.js\";\nexport { SlashCommand } from \"./SlashCommand/SlashCommand.js\";\nexport { FontSize } from \"./FontSize/FontSize.js\";\nexport { Figure } from \"./Figure/Figure.js\";\nexport { Figcaption } from \"./Figcaption/Figcaption.js\";\nexport { BlockquoteFigure } from \"./BlockquoteFigure/BlockquoteFigure.js\";\nexport { Quote } from \"./BlockquoteFigure/Quote/Quote.js\";\nexport { QuoteCaption } from \"./BlockquoteFigure/QuoteCaption/QuoteCaption.js\";\nexport { Link } from \"./Link/Link.js\";\nexport { ImageUpload } from \"./ImageUpload/ImageUpload.js\";\nexport { ImageBlock } from \"./ImageBlock/ImageBlock.js\";\nexport { VideoBlock } from \"./VideoBlock/VideoBlock.js\";\nexport { AudioBlock } from \"./AudioBlock/AudioBlock.js\";\n\nexport { Columns, Column } from \"./MultiColumn/index.js\";\nexport { AICommand } from \"./AICommand/AICommand.js\";\nexport {\n Twitter,\n Linkedin,\n Tiktok,\n Facebook,\n Instagram,\n Youtube,\n} from \"./SocialMedia/index.js\";\nexport { Paragraph } from \"./Paragraph/Paragraph.js\";\nexport { InsideLinks } from \"./InsideLinks/insideLinks.js\";\n"],"names":["StarterKit","Highlight","CharacterCount","Underline","Placeholder","Emoji","gitHubEmojis","TextAlign","TextStyle","FontFamily","Typography","Color","FocusClasses","Focus","Dropcursor","CollaborationCursor","Subscript","TableOfContents","Superscript","CodeBlock","BulletList","OrderedList","Collaboration","TaskItem","TaskList","FileHandler","Selection","Table","TableCell","TableHeader","TableRow","HorizontalRule","Heading","Document","TrailingNode","SlashCommand","FontSize","Figure","Figcaption","BlockquoteFigure","Quote","QuoteCaption","Link","ImageUpload","ImageBlock","VideoBlock","AudioBlock","Columns","Column","AICommand","Twitter","Linkedin","Tiktok","Facebook","Instagram","Youtube","Paragraph","InsideLinks"],"mappings":"AAAA,wDAAwD;AACxD,kBAAkB,GAClB,SAASA,UAAU,QAAQ,sBAAsB;AACjD,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,KAAK,EAAEC,YAAY,QAAQ,8BAA8B;AAClE,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,UAAU,QAAQ,+BAA+B;AAC1D,SAASC,KAAK,QAAQ,0BAA0B;AAChD,SAASC,gBAAgBC,KAAK,QAAQ,0BAA0B;AAChE,SAASC,UAAU,QAAQ,+BAA+B;AAC1D,SAASC,mBAAmB,QAAQ,yCAAyC;AAC7E,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,eAAe,QAAQ,0CAA0C;AAC1E,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,aAAa,QAAQ,kCAAkC;AAChE,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,WAAW,QAAQ,qCAAqC;AAEjE,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,KAAK,EAAEC,SAAS,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,mBAAmB;AAC3E,SAASC,cAAc,QAAQ,qCAAqC;AACpE,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,QAAQ,QAAQ,yBAAyB;AAClD,SAASC,YAAY,QAAQ,kCAAkC;AAC/D,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,QAAQ,QAAQ,yBAAyB;AAClD,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,gBAAgB,QAAQ,yCAAyC;AAC1E,SAASC,KAAK,QAAQ,oCAAoC;AAC1D,SAASC,YAAY,QAAQ,kDAAkD;AAC/E,SAASC,IAAI,QAAQ,iBAAiB;AACtC,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,UAAU,QAAQ,6BAA6B;AAExD,SAASC,OAAO,EAAEC,MAAM,QAAQ,yBAAyB;AACzD,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SACEC,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,OAAO,QACF,yBAAyB;AAChC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,WAAW,QAAQ,+BAA+B"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/index.ts"],"sourcesContent":["// TODO: File causes circular dependency issue in ESLint\n/* eslint-disable */\nexport { StarterKit } from \"@tiptap/starter-kit\";\nexport { Highlight } from \"@tiptap/extension-highlight\";\nexport { CharacterCount } from \"@tiptap/extension-character-count\";\nexport { Underline } from \"@tiptap/extension-underline\";\nexport { Placeholder } from \"@tiptap/extension-placeholder\";\nexport { Emoji, gitHubEmojis } from \"@tiptap-pro/extension-emoji\";\nexport { TextAlign } from \"@tiptap/extension-text-align\";\nexport { TextStyle } from \"@tiptap/extension-text-style\";\nexport { FontFamily } from \"@tiptap/extension-font-family\";\nexport { Typography } from \"@tiptap/extension-typography\";\nexport { Color } from \"@tiptap/extension-color\";\nexport { FocusClasses as Focus } from \"@tiptap/extension-focus\";\nexport { Dropcursor } from \"@tiptap/extension-dropcursor\";\nexport { CollaborationCursor } from \"@tiptap/extension-collaboration-cursor\";\nexport { Subscript } from \"@tiptap/extension-subscript\";\nexport { TableOfContents } from \"@tiptap-pro/extension-table-of-contents\";\nexport { Superscript } from \"@tiptap/extension-superscript\";\nexport { CodeBlock } from \"@tiptap/extension-code-block\";\nexport { BulletList } from \"@tiptap/extension-bullet-list\";\nexport { OrderedList } from \"@tiptap/extension-ordered-list\";\nexport { Collaboration } from \"@tiptap/extension-collaboration\";\nexport { TaskItem } from \"@tiptap/extension-task-item\";\nexport { TaskList } from \"@tiptap/extension-task-list\";\nexport { FileHandler } from \"@tiptap-pro/extension-file-handler\";\n\nexport { Selection } from \"./Selection/Selection.js\";\nexport { Table, TableCell, TableHeader, TableRow } from \"./Table/index.js\";\nexport { HorizontalRule } from \"./HorizontalRule/HorizontalRule.js\";\nexport { Heading } from \"./Heading/Heading.js\";\nexport { Document } from \"./Document/Document.js\";\nexport { TrailingNode } from \"./TrailingNode/trailing-node.js\";\nexport { SlashCommand } from \"./SlashCommand/SlashCommand.js\";\nexport { FontSize } from \"./FontSize/FontSize.js\";\nexport { Figure } from \"./Figure/Figure.js\";\nexport { Figcaption } from \"./Figcaption/Figcaption.js\";\nexport { BlockquoteFigure } from \"./BlockquoteFigure/BlockquoteFigure.js\";\nexport { Quote } from \"./BlockquoteFigure/Quote/Quote.js\";\nexport { QuoteCaption } from \"./BlockquoteFigure/QuoteCaption/QuoteCaption.js\";\nexport { Link } from \"./Link/Link.js\";\nexport { ImageUpload } from \"./ImageUpload/ImageUpload.js\";\nexport { ImageBlock } from \"./ImageBlock/ImageBlock.js\";\nexport { VideoBlock } from \"./VideoBlock/VideoBlock.js\";\nexport { AudioBlock } from \"./AudioBlock/AudioBlock.js\";\n\nexport { Columns, Column } from \"./MultiColumn/index.js\";\nexport { AICommand } from \"./AICommand/AICommand.js\";\nexport {\n Twitter,\n Linkedin,\n Tiktok,\n Facebook,\n Instagram,\n Youtube,\n} from \"./SocialMedia/index.js\";\nexport { Paragraph } from \"./Paragraph/Paragraph.js\";\nexport { InsideLinks } from \"./InsideLinks/insideLinks.js\";\n\n// export * from \"./serverside/index.js\";\n"],"names":["StarterKit","Highlight","CharacterCount","Underline","Placeholder","Emoji","gitHubEmojis","TextAlign","TextStyle","FontFamily","Typography","Color","FocusClasses","Focus","Dropcursor","CollaborationCursor","Subscript","TableOfContents","Superscript","CodeBlock","BulletList","OrderedList","Collaboration","TaskItem","TaskList","FileHandler","Selection","Table","TableCell","TableHeader","TableRow","HorizontalRule","Heading","Document","TrailingNode","SlashCommand","FontSize","Figure","Figcaption","BlockquoteFigure","Quote","QuoteCaption","Link","ImageUpload","ImageBlock","VideoBlock","AudioBlock","Columns","Column","AICommand","Twitter","Linkedin","Tiktok","Facebook","Instagram","Youtube","Paragraph","InsideLinks"],"mappings":"AAAA,wDAAwD;AACxD,kBAAkB,GAClB,SAASA,UAAU,QAAQ,sBAAsB;AACjD,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,KAAK,EAAEC,YAAY,QAAQ,8BAA8B;AAClE,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,UAAU,QAAQ,+BAA+B;AAC1D,SAASC,KAAK,QAAQ,0BAA0B;AAChD,SAASC,gBAAgBC,KAAK,QAAQ,0BAA0B;AAChE,SAASC,UAAU,QAAQ,+BAA+B;AAC1D,SAASC,mBAAmB,QAAQ,yCAAyC;AAC7E,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,eAAe,QAAQ,0CAA0C;AAC1E,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,aAAa,QAAQ,kCAAkC;AAChE,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,WAAW,QAAQ,qCAAqC;AAEjE,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,KAAK,EAAEC,SAAS,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,mBAAmB;AAC3E,SAASC,cAAc,QAAQ,qCAAqC;AACpE,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,QAAQ,QAAQ,yBAAyB;AAClD,SAASC,YAAY,QAAQ,kCAAkC;AAC/D,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,QAAQ,QAAQ,yBAAyB;AAClD,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,gBAAgB,QAAQ,yCAAyC;AAC1E,SAASC,KAAK,QAAQ,oCAAoC;AAC1D,SAASC,YAAY,QAAQ,kDAAkD;AAC/E,SAASC,IAAI,QAAQ,iBAAiB;AACtC,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,UAAU,QAAQ,6BAA6B;AAExD,SAASC,OAAO,EAAEC,MAAM,QAAQ,yBAAyB;AACzD,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SACEC,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,OAAO,QACF,yBAAyB;AAChC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,WAAW,QAAQ,+BAA+B,CAE3D,yCAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentEmbedSupport.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE;;CAAA,+BAyF3C"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Portal } from "@radix-ui/react-portal";
|
|
4
|
+
import Image from "next/image.js";
|
|
5
|
+
import { useLayoutEffect, useState } from "react";
|
|
6
|
+
import { FacebookEmbed, InstagramEmbed, LinkedInEmbed, TikTokEmbed, XEmbed, YouTubeEmbed } from "react-social-media-embed";
|
|
7
|
+
import { cn } from "../../lib/utils/index.js";
|
|
8
|
+
import VideoBlockViewClientside from "../VideoBlock/components/VideoBlockViewClientside.js";
|
|
9
|
+
export function ContentEmbedSupport({ body }) {
|
|
10
|
+
const [mounted, setMounted] = useState(false);
|
|
11
|
+
useLayoutEffect(()=>{
|
|
12
|
+
setMounted(true);
|
|
13
|
+
}, []);
|
|
14
|
+
const renderContent = (content)=>{
|
|
15
|
+
// if (!content.attrs.url) return null;
|
|
16
|
+
switch(content.type){
|
|
17
|
+
case "twitter":
|
|
18
|
+
return /*#__PURE__*/ _jsx(XEmbed, {
|
|
19
|
+
url: content.attrs.url,
|
|
20
|
+
width: 325
|
|
21
|
+
});
|
|
22
|
+
case "youtube":
|
|
23
|
+
return /*#__PURE__*/ _jsx(YouTubeEmbed, {
|
|
24
|
+
url: content.attrs.url
|
|
25
|
+
});
|
|
26
|
+
case "instagram":
|
|
27
|
+
return /*#__PURE__*/ _jsx(InstagramEmbed, {
|
|
28
|
+
className: "max-w-[328px]",
|
|
29
|
+
url: content.attrs.url || "",
|
|
30
|
+
width: 328,
|
|
31
|
+
captioned: true
|
|
32
|
+
});
|
|
33
|
+
case "tiktok":
|
|
34
|
+
return /*#__PURE__*/ _jsx(TikTokEmbed, {
|
|
35
|
+
className: "max-w-[328px]",
|
|
36
|
+
url: content.attrs.url || "",
|
|
37
|
+
width: 328
|
|
38
|
+
});
|
|
39
|
+
case "imageBlock":
|
|
40
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
41
|
+
className: cn("relative object-cover", {
|
|
42
|
+
"aspect-video": !content.attrs.height
|
|
43
|
+
}),
|
|
44
|
+
style: {
|
|
45
|
+
width: content.attrs.width || "100%",
|
|
46
|
+
...content.attrs.height ? {
|
|
47
|
+
height: content.attrs.height
|
|
48
|
+
} : {}
|
|
49
|
+
},
|
|
50
|
+
children: /*#__PURE__*/ _jsx(Image, {
|
|
51
|
+
src: content.attrs.src,
|
|
52
|
+
alt: content.attrs.caption || "",
|
|
53
|
+
style: {
|
|
54
|
+
width: content.attrs.width
|
|
55
|
+
},
|
|
56
|
+
fill: true
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
case "videoBlock":
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
return /*#__PURE__*/ _jsx(VideoBlockViewClientside, {
|
|
62
|
+
node: content
|
|
63
|
+
});
|
|
64
|
+
case "facebook":
|
|
65
|
+
return /*#__PURE__*/ _jsx(FacebookEmbed, {
|
|
66
|
+
url: content.attrs.url || "",
|
|
67
|
+
width: 550
|
|
68
|
+
});
|
|
69
|
+
case "linkedin":
|
|
70
|
+
return /*#__PURE__*/ _jsx(LinkedInEmbed, {
|
|
71
|
+
url: content.attrs.url,
|
|
72
|
+
// postUrl="https://www.linkedin.com/posts/peterdiamandis_5-discoveries-the-james-webb-telescope-will-activity-6898694773406875648-z-D7"
|
|
73
|
+
width: 325,
|
|
74
|
+
height: 570
|
|
75
|
+
});
|
|
76
|
+
default:
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
if (!mounted) return null;
|
|
81
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
82
|
+
children: body.content.filter((content)=>content?.attrs?.["data-id"]).map((content)=>{
|
|
83
|
+
return /*#__PURE__*/ _jsx(Portal, {
|
|
84
|
+
container: document?.querySelector(`[data-id='${content.attrs["data-id"]}']`),
|
|
85
|
+
children: renderContent(content)
|
|
86
|
+
}, `embed-content-${content.attrs["data-id"]}`);
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=ContentEmbedSupport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport Image from \"next/image.js\";\nimport { useLayoutEffect, useState } from \"react\";\nimport {\n FacebookEmbed,\n InstagramEmbed,\n LinkedInEmbed,\n TikTokEmbed,\n XEmbed,\n YouTubeEmbed,\n} from \"react-social-media-embed\";\nimport { cn } from \"../../lib/utils/index.js\";\nimport VideoBlockViewClientside from \"../VideoBlock/components/VideoBlockViewClientside.js\";\n\nexport function ContentEmbedSupport({ body }) {\n const [mounted, setMounted] = useState(false);\n useLayoutEffect(() => {\n setMounted(true);\n }, []);\n\n const renderContent = (content) => {\n // if (!content.attrs.url) return null;\n\n switch (content.type) {\n case \"twitter\":\n return <XEmbed url={content.attrs.url} width={325} />;\n case \"youtube\":\n return <YouTubeEmbed url={content.attrs.url} />;\n case \"instagram\":\n return (\n <InstagramEmbed\n className=\"max-w-[328px]\"\n url={content.attrs.url || \"\"}\n width={328}\n captioned\n />\n );\n case \"tiktok\":\n return (\n <TikTokEmbed\n className=\"max-w-[328px]\"\n url={content.attrs.url || \"\"}\n width={328}\n />\n );\n case \"imageBlock\":\n return (\n <div\n className={cn(\"relative object-cover\", {\n \"aspect-video\": !content.attrs.height,\n })}\n style={{\n width: content.attrs.width || \"100%\",\n ...(content.attrs.height ? { height: content.attrs.height } : {}),\n }}\n >\n {/* @ts-ignore */}\n <Image\n src={content.attrs.src}\n alt={content.attrs.caption || \"\"}\n style={{ width: content.attrs.width }}\n fill\n />\n </div>\n );\n case \"videoBlock\":\n // @ts-ignore\n return <VideoBlockViewClientside node={content} />;\n case \"facebook\":\n return <FacebookEmbed url={content.attrs.url || \"\"} width={550} />;\n case \"linkedin\":\n return (\n <LinkedInEmbed\n url={content.attrs.url}\n // postUrl=\"https://www.linkedin.com/posts/peterdiamandis_5-discoveries-the-james-webb-telescope-will-activity-6898694773406875648-z-D7\"\n width={325}\n height={570}\n />\n );\n\n default:\n return null;\n }\n };\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .map((content) => {\n return (\n <Portal\n key={`embed-content-${content.attrs[\"data-id\"]}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n >\n {renderContent(content)}\n </Portal>\n );\n })}\n </>\n );\n}\n"],"names":["Portal","Image","useLayoutEffect","useState","FacebookEmbed","InstagramEmbed","LinkedInEmbed","TikTokEmbed","XEmbed","YouTubeEmbed","cn","VideoBlockViewClientside","ContentEmbedSupport","body","mounted","setMounted","renderContent","content","type","url","attrs","width","className","captioned","div","height","style","src","alt","caption","fill","node","filter","map","container","document","querySelector"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,OAAOC,WAAW,gBAAgB;AAClC,SAASC,eAAe,EAAEC,QAAQ,QAAQ,QAAQ;AAClD,SACEC,aAAa,EACbC,cAAc,EACdC,aAAa,EACbC,WAAW,EACXC,MAAM,EACNC,YAAY,QACP,2BAA2B;AAClC,SAASC,EAAE,QAAQ,2BAA2B;AAC9C,OAAOC,8BAA8B,uDAAuD;AAE5F,OAAO,SAASC,oBAAoB,EAAEC,IAAI,EAAE;IAC1C,MAAM,CAACC,SAASC,WAAW,GAAGZ,SAAS;IACvCD,gBAAgB;QACda,WAAW;IACb,GAAG,EAAE;IAEL,MAAMC,gBAAgB,CAACC;QACrB,uCAAuC;QAEvC,OAAQA,QAAQC,IAAI;YAClB,KAAK;gBACH,qBAAO,KAACV;oBAAOW,KAAKF,QAAQG,KAAK,CAACD,GAAG;oBAAEE,OAAO;;YAChD,KAAK;gBACH,qBAAO,KAACZ;oBAAaU,KAAKF,QAAQG,KAAK,CAACD,GAAG;;YAC7C,KAAK;gBACH,qBACE,KAACd;oBACCiB,WAAU;oBACVH,KAAKF,QAAQG,KAAK,CAACD,GAAG,IAAI;oBAC1BE,OAAO;oBACPE,SAAS;;YAGf,KAAK;gBACH,qBACE,KAAChB;oBACCe,WAAU;oBACVH,KAAKF,QAAQG,KAAK,CAACD,GAAG,IAAI;oBAC1BE,OAAO;;YAGb,KAAK;gBACH,qBACE,KAACG;oBACCF,WAAWZ,GAAG,yBAAyB;wBACrC,gBAAgB,CAACO,QAAQG,KAAK,CAACK,MAAM;oBACvC;oBACAC,OAAO;wBACLL,OAAOJ,QAAQG,KAAK,CAACC,KAAK,IAAI;wBAC9B,GAAIJ,QAAQG,KAAK,CAACK,MAAM,GAAG;4BAAEA,QAAQR,QAAQG,KAAK,CAACK,MAAM;wBAAC,IAAI,CAAC,CAAC;oBAClE;8BAGA,cAAA,KAACxB;wBACC0B,KAAKV,QAAQG,KAAK,CAACO,GAAG;wBACtBC,KAAKX,QAAQG,KAAK,CAACS,OAAO,IAAI;wBAC9BH,OAAO;4BAAEL,OAAOJ,QAAQG,KAAK,CAACC,KAAK;wBAAC;wBACpCS,IAAI;;;YAIZ,KAAK;gBACH,aAAa;gBACb,qBAAO,KAACnB;oBAAyBoB,MAAMd;;YACzC,KAAK;gBACH,qBAAO,KAACb;oBAAce,KAAKF,QAAQG,KAAK,CAACD,GAAG,IAAI;oBAAIE,OAAO;;YAC7D,KAAK;gBACH,qBACE,KAACf;oBACCa,KAAKF,QAAQG,KAAK,CAACD,GAAG;oBACtB,wIAAwI;oBACxIE,OAAO;oBACPI,QAAQ;;YAId;gBACE,OAAO;QACX;IACF;IACA,IAAI,CAACX,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKI,OAAO,CACVe,MAAM,CAAC,CAACf,UAAYA,SAASG,OAAO,CAAC,UAAU,EAC/Ca,GAAG,CAAC,CAAChB;YACJ,qBACE,KAACjB;gBAECkC,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEnB,QAAQG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;0BAG1CJ,cAAcC;eALV,CAAC,cAAc,EAAEA,QAAQG,KAAK,CAAC,UAAU,EAAE;QAQtD;;AAGR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacebookServerside.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/FacebookServerside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,kBAAkB,gBA0B7B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from '@tiptap/core';
|
|
2
|
+
export const FacebookServerside = Node.create({
|
|
3
|
+
name: 'facebook',
|
|
4
|
+
group: 'block',
|
|
5
|
+
content: 'inline*',
|
|
6
|
+
parseHTML () {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
tag: 'a[data-type="facebook"]'
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
},
|
|
13
|
+
addAttributes () {
|
|
14
|
+
return {
|
|
15
|
+
url: {
|
|
16
|
+
default: null
|
|
17
|
+
},
|
|
18
|
+
'data-id': {
|
|
19
|
+
default: null
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
renderHTML ({ HTMLAttributes }) {
|
|
24
|
+
return [
|
|
25
|
+
'a',
|
|
26
|
+
mergeAttributes(HTMLAttributes, {
|
|
27
|
+
'data-type': 'facebook'
|
|
28
|
+
}),
|
|
29
|
+
0
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=FacebookServerside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/FacebookServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\nexport const FacebookServerside = Node.create({\n name: 'facebook',\n\n group: 'block',\n content: 'inline*',\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"facebook\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n 'data-id': { default: null },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n 'a',\n mergeAttributes(HTMLAttributes, { 'data-type': 'facebook' }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","FacebookServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,qBAAqBF,KAAKG,MAAM,CAAC;IAC5CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;QAC7B;IACF;IACAC,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAZ,gBAAgBY,gBAAgB;gBAAE,aAAa;YAAW;YAC1D;SACD;IACH;AACF,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageBlockServerside.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,oBAAoB,gBA8D/B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from '@tiptap/core';
|
|
2
|
+
export const ImageBlockServerside = Node.create({
|
|
3
|
+
name: 'imageBlock',
|
|
4
|
+
group: 'block',
|
|
5
|
+
content: 'inline*',
|
|
6
|
+
parseHTML () {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
tag: 'img[src*="tiptap.dev"]:not([src^="data:"]), img[src*="windows.net"]:not([src^="data:"])'
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
},
|
|
13
|
+
renderHTML ({ HTMLAttributes }) {
|
|
14
|
+
return [
|
|
15
|
+
'div',
|
|
16
|
+
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {
|
|
17
|
+
class: 'image-wrapper'
|
|
18
|
+
})
|
|
19
|
+
];
|
|
20
|
+
},
|
|
21
|
+
// renderHTML({ HTMLAttributes }) {
|
|
22
|
+
// return [
|
|
23
|
+
// 'img',
|
|
24
|
+
// mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
|
25
|
+
// ];
|
|
26
|
+
// },
|
|
27
|
+
addAttributes () {
|
|
28
|
+
return {
|
|
29
|
+
'data-id': {
|
|
30
|
+
default: null
|
|
31
|
+
},
|
|
32
|
+
src: {
|
|
33
|
+
default: '',
|
|
34
|
+
parseHTML: (element)=>element.getAttribute('src'),
|
|
35
|
+
renderHTML: (attributes)=>({
|
|
36
|
+
src: attributes.src
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
width: {
|
|
40
|
+
default: '100%',
|
|
41
|
+
parseHTML: (element)=>element.getAttribute('data-width'),
|
|
42
|
+
renderHTML: (attributes)=>({
|
|
43
|
+
'data-width': attributes.width
|
|
44
|
+
})
|
|
45
|
+
},
|
|
46
|
+
align: {
|
|
47
|
+
default: 'center',
|
|
48
|
+
parseHTML: (element)=>element.getAttribute('data-align'),
|
|
49
|
+
renderHTML: (attributes)=>({
|
|
50
|
+
'data-align': attributes.align
|
|
51
|
+
})
|
|
52
|
+
},
|
|
53
|
+
alt: {
|
|
54
|
+
default: undefined,
|
|
55
|
+
parseHTML: (element)=>element.getAttribute('alt'),
|
|
56
|
+
renderHTML: (attributes)=>({
|
|
57
|
+
alt: attributes.alt
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=ImageBlockServerside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\nexport const ImageBlockServerside = Node.create({\n name: 'imageBlock',\n group: 'block',\n content: 'inline*',\n\n parseHTML() {\n return [\n {\n tag: 'img[src*=\"tiptap.dev\"]:not([src^=\"data:\"]), img[src*=\"windows.net\"]:not([src^=\"data:\"])',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'div', // Create a div wrapper\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n class: 'image-wrapper',\n }), // Add any desired attributes to the wrapper\n ];\n },\n\n // renderHTML({ HTMLAttributes }) {\n // return [\n // 'img',\n // mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n // ];\n // },\n\n addAttributes() {\n return {\n 'data-id': { default: null },\n src: {\n default: '',\n parseHTML: element => element.getAttribute('src'),\n renderHTML: attributes => ({\n src: attributes.src,\n }),\n },\n width: {\n default: '100%',\n parseHTML: element => element.getAttribute('data-width'),\n renderHTML: attributes => ({\n 'data-width': attributes.width,\n }),\n },\n align: {\n default: 'center',\n parseHTML: element => element.getAttribute('data-align'),\n renderHTML: attributes => ({\n 'data-align': attributes.align,\n }),\n },\n alt: {\n default: undefined,\n parseHTML: element => element.getAttribute('alt'),\n renderHTML: attributes => ({\n alt: attributes.alt,\n }),\n },\n };\n },\n});\n"],"names":["Node","mergeAttributes","ImageBlockServerside","create","name","group","content","parseHTML","tag","renderHTML","HTMLAttributes","options","class","addAttributes","default","src","element","getAttribute","attributes","width","align","alt","undefined"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,uBAAuBF,KAAKG,MAAM,CAAC;IAC9CC,MAAM;IACNC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IAEAC,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAT,gBAAgB,IAAI,CAACU,OAAO,CAACD,cAAc,EAAEA,gBAAgB;gBAC3DE,OAAO;YACT;SACD;IACH;IAEA,mCAAmC;IACnC,aAAa;IACb,aAAa;IACb,oEAAoE;IACpE,OAAO;IACP,KAAK;IAELC;QACE,OAAO;YACL,WAAW;gBAAEC,SAAS;YAAK;YAC3BC,KAAK;gBACHD,SAAS;gBACTP,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzBH,KAAKG,WAAWH,GAAG;oBACrB,CAAA;YACF;YACAI,OAAO;gBACLL,SAAS;gBACTP,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzB,cAAcA,WAAWC,KAAK;oBAChC,CAAA;YACF;YACAC,OAAO;gBACLN,SAAS;gBACTP,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzB,cAAcA,WAAWE,KAAK;oBAChC,CAAA;YACF;YACAC,KAAK;gBACHP,SAASQ;gBACTf,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzBG,KAAKH,WAAWG,GAAG;oBACrB,CAAA;YACF;QACF;IACF;AACF,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstagramServerside.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InstagramServerside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,mBAAmB,gBA0B9B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from '@tiptap/core';
|
|
2
|
+
export const InstagramServerside = Node.create({
|
|
3
|
+
name: 'instagram',
|
|
4
|
+
group: 'block',
|
|
5
|
+
content: 'inline*',
|
|
6
|
+
parseHTML () {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
tag: 'a[data-type="instagram"]'
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
},
|
|
13
|
+
addAttributes () {
|
|
14
|
+
return {
|
|
15
|
+
url: {
|
|
16
|
+
default: null
|
|
17
|
+
},
|
|
18
|
+
'data-id': {
|
|
19
|
+
default: null
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
renderHTML ({ HTMLAttributes }) {
|
|
24
|
+
return [
|
|
25
|
+
'a',
|
|
26
|
+
mergeAttributes(HTMLAttributes, {
|
|
27
|
+
'data-type': 'instagram'
|
|
28
|
+
}),
|
|
29
|
+
0
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=InstagramServerside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InstagramServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\nexport const InstagramServerside = Node.create({\n name: 'instagram',\n\n group: 'block',\n content: 'inline*',\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"instagram\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n 'data-id': { default: null },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n 'a',\n mergeAttributes(HTMLAttributes, { 'data-type': 'instagram' }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","InstagramServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,sBAAsBF,KAAKG,MAAM,CAAC;IAC7CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;QAC7B;IACF;IACAC,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAZ,gBAAgBY,gBAAgB;gBAAE,aAAa;YAAY;YAC3D;SACD;IACH;AACF,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkedinServerside.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,kBAAkB,gBA0B7B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from '@tiptap/core';
|
|
2
|
+
export const LinkedinServerside = Node.create({
|
|
3
|
+
name: 'linkedin',
|
|
4
|
+
group: 'block',
|
|
5
|
+
content: 'inline*',
|
|
6
|
+
parseHTML () {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
tag: 'a[data-type="linkedin"]'
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
},
|
|
13
|
+
addAttributes () {
|
|
14
|
+
return {
|
|
15
|
+
url: {
|
|
16
|
+
default: null
|
|
17
|
+
},
|
|
18
|
+
'data-id': {
|
|
19
|
+
default: null
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
renderHTML ({ HTMLAttributes }) {
|
|
24
|
+
return [
|
|
25
|
+
'a',
|
|
26
|
+
mergeAttributes(HTMLAttributes, {
|
|
27
|
+
'data-type': 'linkedin'
|
|
28
|
+
}),
|
|
29
|
+
0
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=LinkedinServerside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\nexport const LinkedinServerside = Node.create({\n name: 'linkedin',\n\n group: 'block',\n content: 'inline*',\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"linkedin\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n 'data-id': { default: null },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n 'a',\n mergeAttributes(HTMLAttributes, { 'data-type': 'linkedin' }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","LinkedinServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,qBAAqBF,KAAKG,MAAM,CAAC;IAC5CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;QAC7B;IACF;IACAC,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAZ,gBAAgBY,gBAAgB;gBAAE,aAAa;YAAW;YAC1D;SACD;IACH;AACF,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServersideTiptapBody.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ServersideTiptapBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAuE1B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AACF,eAAO,MAAM,oBAAoB,aAAc,KAAK,sBA+EnD,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { generateHTML } from "@tiptap/html";
|
|
4
|
+
import { Text } from "@tiptap/extension-text";
|
|
5
|
+
import { StarterKit, Highlight, Underline, Placeholder, TextAlign, TextStyle, FontFamily, Typography, Subscript, Superscript, HorizontalRule, Heading, Document, BlockquoteFigure, Quote, QuoteCaption, Link, Paragraph } from "../index.js";
|
|
6
|
+
import { TwitterBlockServerside } from "./TwitterBlockServerside.js";
|
|
7
|
+
import { YouTubeServerside } from "./YouTubeServerside.js";
|
|
8
|
+
import { InstagramServerside } from "./InstagramServerside.js";
|
|
9
|
+
import { ImageBlockServerside } from "./ImageBlockServerside.js";
|
|
10
|
+
import { TiktokServerside } from "./TiktokServerside.js";
|
|
11
|
+
import { LinkedinServerside } from "./LinkedinServerside.js";
|
|
12
|
+
import { FacebookServerside } from "./FacebookServerside.js";
|
|
13
|
+
import { VideoBlockServerside } from "./VideoBlockServerside.js";
|
|
14
|
+
export const ServersideTiptapBody = ({ body })=>{
|
|
15
|
+
if (!body) return null;
|
|
16
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
17
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
18
|
+
className: "tiptap ProseMirror min-h-full",
|
|
19
|
+
dangerouslySetInnerHTML: {
|
|
20
|
+
__html: generateHTML(body, [
|
|
21
|
+
Text,
|
|
22
|
+
StarterKit.configure({
|
|
23
|
+
document: false,
|
|
24
|
+
dropcursor: false,
|
|
25
|
+
heading: false,
|
|
26
|
+
horizontalRule: false,
|
|
27
|
+
blockquote: false,
|
|
28
|
+
history: false,
|
|
29
|
+
codeBlock: false
|
|
30
|
+
}),
|
|
31
|
+
Highlight,
|
|
32
|
+
// CharacterCount,
|
|
33
|
+
Underline,
|
|
34
|
+
Placeholder,
|
|
35
|
+
// Emoji,
|
|
36
|
+
TextAlign,
|
|
37
|
+
TextStyle,
|
|
38
|
+
FontFamily,
|
|
39
|
+
Typography,
|
|
40
|
+
// Color,
|
|
41
|
+
// Dropcursor,
|
|
42
|
+
// CollaborationCursor,
|
|
43
|
+
// Subscript,
|
|
44
|
+
// TableOfContents,
|
|
45
|
+
// Superscript,
|
|
46
|
+
// CodeBlock,
|
|
47
|
+
// BulletList,
|
|
48
|
+
// OrderedList,
|
|
49
|
+
// Collaboration,
|
|
50
|
+
// TaskItem,
|
|
51
|
+
// TaskList,
|
|
52
|
+
// FileHandler,
|
|
53
|
+
// Selection,
|
|
54
|
+
// Focus,
|
|
55
|
+
// Table,
|
|
56
|
+
HorizontalRule,
|
|
57
|
+
Heading,
|
|
58
|
+
Document,
|
|
59
|
+
// TrailingNode,
|
|
60
|
+
// SlashCommand,
|
|
61
|
+
// FontSize,
|
|
62
|
+
// Figure,
|
|
63
|
+
// Figcaption,
|
|
64
|
+
BlockquoteFigure,
|
|
65
|
+
Quote,
|
|
66
|
+
QuoteCaption,
|
|
67
|
+
ImageBlockServerside,
|
|
68
|
+
VideoBlockServerside,
|
|
69
|
+
// AudioBlock,
|
|
70
|
+
// Columns,
|
|
71
|
+
TwitterBlockServerside,
|
|
72
|
+
InstagramServerside,
|
|
73
|
+
YouTubeServerside,
|
|
74
|
+
Paragraph,
|
|
75
|
+
Superscript,
|
|
76
|
+
Subscript,
|
|
77
|
+
Link,
|
|
78
|
+
TiktokServerside,
|
|
79
|
+
LinkedinServerside,
|
|
80
|
+
FacebookServerside
|
|
81
|
+
])
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=ServersideTiptapBody.js.map
|