The Wayback Machine - https://web.archive.org/web/20210817105834/https://github.com/codex-team/editor.js/issues/1702
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Switching to readonly mode with an empty editor #1702

Open
Bezpro opened this issue Jun 1, 2021 · 0 comments
Open

[Bug] Switching to readonly mode with an empty editor #1702

Bezpro opened this issue Jun 1, 2021 · 0 comments

Comments

@Bezpro
Copy link

@Bezpro Bezpro commented Jun 1, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants