codex-team/editor.js

[Bug] Switching to readonly mode with an empty editor

Open

#1,702 建立於 2021年6月1日

在 GitHub 查看
 (2 留言) (2 反應) (1 負責人)TypeScript (1,985 fork)batch import
buggood first issue

倉庫指標

Star
 (26,602 star)
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

貢獻者指南