codex-team / codex-team/editor.js

editor.js in vscode extension webview throw error

Open
#2,729 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Describe a bug.

Steps to reproduce:
1. create webview in vscode extension
2. code as follow. webview.html=
```html









var editor = new EditorJS({
holder: "editorjs",
tools: {},
data: {
blocks: [
{
type: "paragraph",
data: {
text: "Hey. Meet the new Editor. On this page you can see it in action — try to edit this text. Source code of the page contains the example of connection and configuration.",
},
},
],
},
});

```
4. throw error `Uncaught (in promise) DOMException: getLayoutMap() must be called from a top-level browsing context or allowed by the permission policy.`

Expected behavior:
work
Or can this feature be disabled to make other parts of the editor work properly?

Screenshots:
![2024-05-29_08-54](https://github.com/codex-team/editor.js/assets/9607121/1202312a-38b2-4678-9f0a-b70c6691ffe7)

Device, Browser, OS:
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.5.0-35-generic

Editor.js version: 2.29.1

Plugins you use with their versions:
no plugin

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.