codex-team/editor.js

[Bug] Switching to readonly mode with an empty editor

オープン

#1,702 opened on 2021/06/01

 (2 件のコメント) (2 件のリアクション) (1 人の担当者)TypeScript (1,985 件のフォーク)batch import
buggood first issue

Repository metrics

Stars
 (26,602 個のスター)
PR merge metrics
 (30d に merged 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

コントリビューターガイド