refactor(editor): set readonly (#9475)

This commit is contained in:
Saul-Mirone
2025-01-02 04:02:15 +00:00
parent d0983696c0
commit be387a6f33
17 changed files with 32 additions and 50 deletions

View File

@@ -343,9 +343,7 @@ export class AffineFormatBarWidget extends WidgetComponent {
}
private _shouldDisplay() {
const readonly = this.doc.awarenessStore.isReadonly(
this.doc.blockCollection
);
const readonly = this.doc.readonly;
const active = this.host.event.active;
if (readonly || !active) return false;