codex-team/editor.js

[Bug] Switching to readonly mode with an empty editor

开放

#1,702 创建于 2021年6月1日

 (2 条评论) (2 个反应) (1 位负责人)TypeScript (1,985 个派生)batch import
buggood first issue

仓库指标

星标
 (26,602 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Describe a bug. If you switch the editor to read-only mode after initialization, an error appears: System.Exception: Cannot read property 'holder' of undefined

togglePreviewVisibility(visible: boolean) {
		this._editor.readOnly.toggle(visible); // this._editor.blocks.getBlocksCount() === 0
		this.previewVisible = visible;
	}

Editor.js version: 2.22.0

贡献者指南