From 11244a698bce594982ee5dca55b9695bb774451c Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 7 Oct 2024 18:13:38 -0400
Subject: moved all quiz code out of LabelBox and ImageBox and into
 StyleProviderQuiz.  changed quizBoxes and quizMode to be stored as Doc
 metadata. Extended styles to cover contextMenuItems.   remove
 this.setListening() from comparisonBox until contextMenu selectedVal is
 fixed.

---
 src/client/views/nodes/DocumentView.tsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/client/views/nodes/DocumentView.tsx')

diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 5054432a9..04a31fd83 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -545,6 +545,9 @@ export class DocumentViewInternal extends DocComponent<FieldViewProps & Document
             return;
         }
 
+        const items = this._props.styleProvider?.(this.Document, this._props, StyleProp.ContextMenuItems) as ContextMenuProps[];
+        items?.forEach(item => ContextMenu.Instance.addItem(item));
+
         const customScripts = Cast(this.Document.contextMenuScripts, listSpec(ScriptField), []);
         StrListCast(this.Document.contextMenuLabels).forEach((label, i) =>
             cm.addItem({ description: label, event: () => customScripts[i]?.script.run({ documentView: this, this: this.Document, scriptContext: this._props.scriptContext }), icon: 'sticky-note' })
-- 
cgit v1.2.3-70-g09d2

