MCPcopy Index your code
hub / github.com/resend/react-email / createEditor

Function createEditor

packages/editor/src/extensions/trailing-node.spec.ts:10–19  ·  view source on GitHub ↗
(extensions: AnyExtension[], content: JSONContent)

Source from the content-addressed store, hash-verified

8}));
9
10function createEditor(extensions: AnyExtension[], content: JSONContent) {
11 const editor = new Editor({
12 extensions,
13 content,
14 });
15 // appendTransaction only runs when a transaction is dispatched,
16 // not on initial state creation, so we trigger one here.
17 editor.view.dispatch(editor.state.tr);
18 return editor;
19}
20
21describe('TrailingNode', () => {
22 let editor: Editor;

Callers 1

Calls 1

dispatchMethod · 0.80

Tested by

no test coverage detected