codex-team / codex-team/editor.js

❓Editor.js inside web component

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

Description

**Question**

How do I embed editor js inside web component ?

**Context**

Our application is developed around web component (Lit) and we would like to give a try to editorjs. But when we use it something wierd happens with styles.

![image](https://user-images.githubusercontent.com/8665009/165306306-06e7de9f-1c1f-4f82-9ba0-37e3a8097d48.png)

`
import {css, html, LitElement} from 'lit'
import EditorJS from '@editorjs/editorjs';

export class TestingEditor extends LitElement {

firstUpdated(_changedProperties) {
const editor = new EditorJS(this.renderRoot.querySelector('#editorjs'));
}

render() {
return html`

`
}
}

customElements.define('testing-editor', TestingEditor)

`

Any tips appreciated.

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.