(
editor: Editor,
transform: TextSerializerWithTransform<T>,
options: T,
)
| 37 | }, |
| 38 | |
| 39 | withEditor<T = TextSerializerOptions>( |
| 40 | editor: Editor, |
| 41 | transform: TextSerializerWithTransform<T>, |
| 42 | options: T, |
| 43 | ) { |
| 44 | const fns = TEXT_SERIALIZER_TRANSFORMS.get(editor) ?? [] |
| 45 | if (fns.find(fn => fn.transform === transform)) return |
| 46 | fns.push({ |
| 47 | transform: transform as TextSerializerWithTransform, |
| 48 | options: options as TextSerializerOptions, |
| 49 | }) |
| 50 | TEXT_SERIALIZER_TRANSFORMS.set(editor, fns) |
| 51 | }, |
| 52 | |
| 53 | transformWithEditor(editor: Editor, node: Node = editor): string { |
| 54 | const TextSerializerEditor = Object.assign({}, TextSerializer) |
no test coverage detected