Elffuss
Braid
Hub
Explore
Sign up or sign in
kikocis
/
continue
public
0 stars
1 watching
0 forks
Code
History
Issues
Requests
continue
/
gui
/
src
/
components
/
mainInput
/
utils.ts
71fd2e7d4456 · 321 B
Raw
Permalink
1
import { JSONContent } from "@tiptap/core";
2
3
export function getParagraphNodeFromString(str: string): JSONContent {
4
return {
5
type: "doc",
6
content: [
7
{
8
type: "paragraph",
9
content: [
10
{
11
type: "text",
12
text: str,
13
},
14
],
15
},
16
],
17
};
18
}