codex-team/editor.js

[Bug] Switching to readonly mode with an empty editor

Open

#1.702 aberto em 1 de jun. de 2021

Ver no GitHub
 (2 comments) (2 reactions) (1 assignee)TypeScript (1.985 forks)batch import
buggood first issue

Métricas do repositório

Stars
 (26.602 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador