diff --git a/packages/client/src/tiptap/core/extensions/document-reference.ts b/packages/client/src/tiptap/core/extensions/document-reference.ts
index 2f84914e..aec83207 100644
--- a/packages/client/src/tiptap/core/extensions/document-reference.ts
+++ b/packages/client/src/tiptap/core/extensions/document-reference.ts
@@ -25,6 +25,10 @@ export const DocumentReference = Node.create({
addAttributes() {
return {
+ organizationId: {
+ default: '',
+ parseHTML: getDatasetAttribute('organizationId'),
+ },
wikiId: {
default: '',
parseHTML: getDatasetAttribute('wikiId'),
diff --git a/packages/client/src/tiptap/core/menus/document-reference/bubble.tsx b/packages/client/src/tiptap/core/menus/document-reference/bubble.tsx
index 3bc721bd..8b8a0dc5 100644
--- a/packages/client/src/tiptap/core/menus/document-reference/bubble.tsx
+++ b/packages/client/src/tiptap/core/menus/document-reference/bubble.tsx
@@ -33,11 +33,11 @@ export const DocumentReferenceBubbleMenu = ({ editor }) => {
const shouldShow = useCallback(() => editor.isActive(DocumentReference.name), [editor]);
const selectDoc = useCallback(
(item) => {
- const { wikiId, title, id: documentId } = item;
+ const { organizationId, wikiId, title, id: documentId } = item;
editor
.chain()
- .updateAttributes(DocumentReference.name, { wikiId, documentId, title })
+ .updateAttributes(DocumentReference.name, { organizationId, wikiId, documentId, title })
.setNodeSelection(editor.state.selection.from)
.focus()
.run();
diff --git a/packages/client/src/tiptap/core/wrappers/document-children/index.tsx b/packages/client/src/tiptap/core/wrappers/document-children/index.tsx
index d8f7f1f0..bba3f1ab 100644
--- a/packages/client/src/tiptap/core/wrappers/document-children/index.tsx
+++ b/packages/client/src/tiptap/core/wrappers/document-children/index.tsx
@@ -59,8 +59,10 @@ export const DocumentChildrenWrapper = ({ editor, node, updateAttributes }) => {
diff --git a/packages/client/src/tiptap/core/wrappers/document-reference/index.tsx b/packages/client/src/tiptap/core/wrappers/document-reference/index.tsx
index cc41c19e..5a5ca181 100644
--- a/packages/client/src/tiptap/core/wrappers/document-reference/index.tsx
+++ b/packages/client/src/tiptap/core/wrappers/document-reference/index.tsx
@@ -11,7 +11,7 @@ export const DocumentReferenceWrapper = ({ editor, node, updateAttributes }) =>
const { pathname } = useRouter();
const isShare = pathname.includes('share');
const isEditable = editor.isEditable;
- const { wikiId, documentId, title } = node.attrs;
+ const { organizationId, wikiId, documentId, title } = node.attrs;
const content = useMemo(() => {
if (!wikiId && !documentId) {
@@ -35,8 +35,10 @@ export const DocumentReferenceWrapper = ({ editor, node, updateAttributes }) =>
@@ -45,7 +47,7 @@ export const DocumentReferenceWrapper = ({ editor, node, updateAttributes }) =>
);
- }, [wikiId, documentId, isEditable, isShare, title]);
+ }, [organizationId, wikiId, documentId, isEditable, isShare, title]);
return (