mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 11:30:04 +08:00
chore: merge blocksuite source code (#9213)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { EditorHost } from '@blocksuite/block-std';
|
||||
|
||||
export function isInsidePageEditor(host: EditorHost) {
|
||||
return Array.from(host.children).some(
|
||||
v => v.tagName.toLowerCase() === 'affine-page-root'
|
||||
);
|
||||
}
|
||||
|
||||
export function isInsideEdgelessEditor(host: EditorHost) {
|
||||
return Array.from(host.children).some(
|
||||
v =>
|
||||
v.tagName.toLowerCase() === 'affine-edgeless-root' ||
|
||||
v.tagName.toLowerCase() === 'affine-edgeless-root-preview'
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user