Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.html
dist/
node_modules/

24 changes: 24 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Embed Tool | EditorJS</title>
</head>
<body>
<div id="editorjs"></div>
<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
<script type="module">
import Embed from "./src/index.ts";

const editor = new EditorJS({
holder: 'editorjs',
tools: {
embed: {
class: Embed,
},
},
});
</script>
</body>
</html>
14 changes: 7 additions & 7 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import path from "path";
import path from 'path';
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
import * as pkg from "./package.json";
import dts from 'vite-plugin-dts';

const NODE_ENV = process.argv.mode || "development";
const NODE_ENV = process.argv.mode || 'development';
const VERSION = pkg.version;

export default {
build: {
copyPublicDir: false,
lib: {
entry: path.resolve(__dirname, "src", "index.ts"),
name: "Embed",
fileName: "embed",
entry: path.resolve(__dirname, 'src', 'index.ts'),
name: 'Embed',
fileName: 'embed',
},
},
define: {
Expand All @@ -22,7 +22,7 @@ export default {

plugins: [cssInjectedByJsPlugin(),
dts({
tsconfigPath: './tsconfig.json'
})
tsconfigPath: './tsconfig.json',
}),
],
};