Bring back notice menu (#10860)

* fix: notice menu regression

* fix: local var
This commit is contained in:
Apoorv Mishra
2025-12-11 21:21:19 +05:30
committed by GitHub
parent 1e894aabdf
commit f8a79f9e79

View File

@@ -93,6 +93,7 @@ export function SelectionToolbar(props: Props) {
selection.node.type.name === "embed";
const isCodeSelection = isInCode(state, { onlyBlock: true });
const isNoticeSelection = isInNotice(state);
if (isEmbedSelection && !readOnly) {
setActiveToolbar(Toolbar.Media);
@@ -102,6 +103,8 @@ export function SelectionToolbar(props: Props) {
setActiveToolbar(Toolbar.Menu);
} else if (!selection.empty) {
setActiveToolbar(Toolbar.Menu);
} else if (isNoticeSelection && selection.empty) {
setActiveToolbar(Toolbar.Menu);
} else if (selection.empty) {
setActiveToolbar(null);
}