diff --git a/src/content/collaboration/documents/snapshot-compare.mdx b/src/content/collaboration/documents/snapshot-compare.mdx index 7949c20..f22f9f7 100644 --- a/src/content/collaboration/documents/snapshot-compare.mdx +++ b/src/content/collaboration/documents/snapshot-compare.mdx @@ -66,14 +66,14 @@ const editor = new Editor({ #### Using `mapDiffToDecorations` for diff decorations -The extension has a default mapping (`defaultMapToDecorations`) to represent diffs as ProseMirror decorations. +The extension has a default mapping (`defaultMapDiffToDecorations`) to represent diffs as ProseMirror decorations. For more complex integrations and control, you can customize this mapping with the `mapDiffToDecorations` option. **Example:** Applying custom predefined background colors to inline inserts ```ts SnapshotCompare.configure({ - mapDiffToDecorations: ({ diff, tr, editor, defaultMapToDecorations }) => { + mapDiffToDecorations: ({ diff, tr, editor, defaultMapDiffToDecorations }) => { if (diff.type === 'inline-insert') { // return prosemirror decoration(s) or null return Decoration.inline( @@ -91,7 +91,7 @@ SnapshotCompare.configure({ } // fallback to the default mapping - return defaultMapToDecorations({ + return defaultMapDiffToDecorations({ diff, tr, editor,