mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
Merge branch 'fix/page-plugin' of github.com:toeverything/AFFiNE into fix/page-plugin
This commit is contained in:
@@ -83,7 +83,7 @@ export const CommandMenu = ({ editor, hooks, style }: CommandMenuProps) => {
|
||||
async (event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
const { type, anchorNode } = editor.selection.currentSelectInfo;
|
||||
// console.log(await editor.getBlockById(anchorNode.id));
|
||||
let activeBlock = await editor.getBlockById(anchorNode.id);
|
||||
const activeBlock = await editor.getBlockById(anchorNode.id);
|
||||
if (activeBlock.type === Protocol.Block.Type.page) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export const InlineMenuContainer = ({ editor }: InlineMenuContainerProps) => {
|
||||
const unsubscribe = editor.selection.onSelectEnd(async info => {
|
||||
const { type, browserSelection, anchorNode } = info;
|
||||
if (anchorNode) {
|
||||
let activeBlock = await editor.getBlockById(anchorNode.id);
|
||||
const activeBlock = await editor.getBlockById(anchorNode.id);
|
||||
if (activeBlock.type === Protocol.Block.Type.page) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user