Skip to content

Commit cdc48a6

Browse files
fix(10-03): resolve Suggestion plugin key collision between WikiLink and Citation
Both extensions registered @tiptap/suggestion without unique pluginKey, causing ProseMirror to throw "Adding different instances of a keyed plugin (suggestion$)". Add distinct pluginKey values: 'wikiLinkSuggestion' and 'citationSuggestion'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b0114bf commit cdc48a6

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎frontend/src/components/CitationExtension.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export function createCitationExtension({
258258

259259
// ── Suggestion: @ triggers autocomplete popup ────────────────────────
260260
Suggestion({
261+
pluginKey: 'citationSuggestion',
261262
editor: this.editor,
262263
char: '@',
263264
allowSpaces: true,

‎frontend/src/components/WikiLinkExtension.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export function createWikiLinkExtension({ getAllNotes, onWikiLinkClick }) {
258258

259259
// ── Suggestion: [[ triggers autocomplete popup ───────────────────
260260
Suggestion({
261+
pluginKey: 'wikiLinkSuggestion',
261262
editor: this.editor,
262263
char: '[[',
263264
allowSpaces: true,

0 commit comments

Comments
 (0)