mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +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>) => {
|
async (event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||||
const { type, anchorNode } = editor.selection.currentSelectInfo;
|
const { type, anchorNode } = editor.selection.currentSelectInfo;
|
||||||
// console.log(await editor.getBlockById(anchorNode.id));
|
// 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) {
|
if (activeBlock.type === Protocol.Block.Type.page) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const InlineMenuContainer = ({ editor }: InlineMenuContainerProps) => {
|
|||||||
const unsubscribe = editor.selection.onSelectEnd(async info => {
|
const unsubscribe = editor.selection.onSelectEnd(async info => {
|
||||||
const { type, browserSelection, anchorNode } = info;
|
const { type, browserSelection, anchorNode } = info;
|
||||||
if (anchorNode) {
|
if (anchorNode) {
|
||||||
let activeBlock = await editor.getBlockById(anchorNode.id);
|
const activeBlock = await editor.getBlockById(anchorNode.id);
|
||||||
if (activeBlock.type === Protocol.Block.Type.page) {
|
if (activeBlock.type === Protocol.Block.Type.page) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user