chore: Move editor into codebase (#2930)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { Node, Fragment } from "prosemirror-model";
|
||||
import { parser, schema } from "rich-markdown-editor";
|
||||
import { prosemirrorToYDoc } from "y-prosemirror";
|
||||
import * as Y from "yjs";
|
||||
import embeds from "@shared/embeds";
|
||||
import embeds from "@shared/editor/embeds";
|
||||
import { parser, schema } from "@server/editor";
|
||||
|
||||
export default function markdownToYDoc(
|
||||
markdown: string,
|
||||
@@ -10,7 +10,7 @@ export default function markdownToYDoc(
|
||||
): Y.Doc {
|
||||
let node = parser.parse(markdown);
|
||||
|
||||
// in rich-markdown-editor embeds were created at runtime by converting links
|
||||
// in the editor embeds were created at runtime by converting links
|
||||
// into embeds where they match. Because we're converting to a CRDT structure
|
||||
// on the server we need to mimic this behavior.
|
||||
function urlsToEmbeds(node: Node): Node {
|
||||
|
||||
Reference in New Issue
Block a user