* cleanup * add context * EventEmitter allows removal of toolbar props from extensions * Move to 'packages' of extensions Remove EmojiTrigger extension * types * iteration * fix render flashing * fix: Missing nodes in collection descriptions
22 lines
601 B
TypeScript
22 lines
601 B
TypeScript
import { Schema } from "prosemirror-model";
|
|
import ExtensionManager from "@shared/editor/lib/ExtensionManager";
|
|
import fullPackage from "@shared/editor/packages/full";
|
|
import render from "./renderToHtml";
|
|
|
|
const extensions = new ExtensionManager(fullPackage);
|
|
|
|
export const schema = new Schema({
|
|
nodes: extensions.nodes,
|
|
marks: extensions.marks,
|
|
});
|
|
|
|
export const parser = extensions.parser({
|
|
schema,
|
|
plugins: extensions.rulePlugins,
|
|
});
|
|
|
|
export const serializer = extensions.serializer();
|
|
|
|
export const renderToHtml = (markdown: string): string =>
|
|
render(markdown, extensions.rulePlugins);
|