MCPcopy Create free account
hub / github.com/editablejs/editable / withEditorSerializerTransform

Function withEditorSerializerTransform

packages/serializer/src/markdown.ts:38–47  ·  view source on GitHub ↗
(next, _, { editor })

Source from the content-addressed store, hash-verified

36const withEditorSerializerTransform: MarkdownSerializerWithTransform<
37 EditorMarkdownSerializerOptions
38> = (next, _, { editor }) => {
39 return (node, options = {}) => {
40 if (Element.isElement(node)) {
41 const { type = 'paragraph' } = node
42 if (type !== 'paragraph')
43 return [{ type: 'html', value: HTMLSerializer.transformWithEditor(editor, node) }]
44 }
45 return next(node, options)
46 }
47}
48
49export const MarkdownSerializer = {
50 transform(node: Node, options: MarkdownSerializerOptions = {}): Content[] {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…