Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
🆙 toText updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed May 5, 2021
1 parent 42d5e5a commit e1b1628
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/serialize/text/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Schema, DOMSerializer, Node as ProsemirrorNode } from 'prosemirror-model';
import { DOMSerializer, Node as ProsemirrorNode } from 'prosemirror-model';
import { getSchema, UseSchema } from '../../schemas';

export function toText(doc: ProsemirrorNode, schema: Schema, document: Document) {
export function toText(doc: ProsemirrorNode, useSchema: UseSchema, document: Document) {
const div = document.createElement('div');
const schema = getSchema(useSchema);
const frag = DOMSerializer
.fromSchema(schema)
.serializeFragment(doc.content, { document });
Expand Down

0 comments on commit e1b1628

Please sign in to comment.