From cb0f7032fddee3257687c0c8234cf196807163c9 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 17 Aug 2023 14:50:41 -0700 Subject: [PATCH] feat: add custom context menu rendering (#7409) --- core/contextmenu_registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/contextmenu_registry.ts b/core/contextmenu_registry.ts index 440022d5c..daf4b3be9 100644 --- a/core/contextmenu_registry.ts +++ b/core/contextmenu_registry.ts @@ -137,7 +137,7 @@ export namespace ContextMenuRegistry { export interface RegistryItem { callback: (p1: Scope) => void; scopeType: ScopeType; - displayText: ((p1: Scope) => string) | string; + displayText: ((p1: Scope) => string | HTMLElement) | string | HTMLElement; preconditionFn: (p1: Scope) => string; weight: number; id: string; @@ -147,7 +147,7 @@ export namespace ContextMenuRegistry { * A menu item as presented to contextmenu.js. */ export interface ContextMenuOption { - text: string; + text: string | HTMLElement; enabled: boolean; callback: (p1: Scope) => void; scope: Scope;