editorjs-element
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "editorjs-element", | ||
"version": "1.0.0", | ||
"description": "Shadowed Editor.js element", | ||
"version": "1.0.1", | ||
"description": "Shadowed Editor.js element with iframe", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "codex", |
@@ -0,1 +1,2 @@ | ||
<!-- markdownlint-disable first-line-h1 --> | ||
<h1 align="center">Welcome to editorjs-element 👋</h1> | ||
@@ -20,8 +21,23 @@ <p> | ||
> Shadowed Editor.js element | ||
> Shadowed Editor.js element with iframe | ||
## 💡 Motivation | ||
DOM event, CSS Style, etc may conflict each other when multiple Editor.js instances are launched in same page. | ||
By launching Editor.js in iframe, these problems are resolved forcibly. This repository provides the template of Editor.js in iframe. | ||
## Usage | ||
Launch editorjs-element by loading [dist/index.html](https://github.com/hata6502/editorjs-element/blob/main/dist/index.html) in iframe. | ||
```html | ||
<iframe src="index.html"></iframe> | ||
``` | ||
editorjs-element can be communicated via [window.postMessage](https://developer.mozilla.org/ja/docs/Web/API/Window/postMessage). | ||
The message interface is [here](https://github.com/hata6502/editorjs-element/blob/main/dist/index.d.ts), | ||
and example is [here (window.addEventListener)](https://github.com/hata6502/editorjs-inline/blob/master/src/index.ts). | ||
This repository is a template, please fork it in order to customize Editor.js! | ||
## Build | ||
@@ -43,3 +59,3 @@ | ||
- Website: https://b-hood.site/ | ||
- Website: <https://b-hood.site/> | ||
- Twitter: [@hata6502](https://twitter.com/hata6502) | ||
@@ -46,0 +62,0 @@ - Github: [@hata6502](https://github.com/hata6502) |
1410219
82