Created
April 7, 2019 09:11
-
-
Save dimensi/2af7ab3b96cd6cccb7319f2eea836538 to your computer and use it in GitHub Desktop.
Example for use editorjs without js bundlers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Editor.js playground</title> | |
</head> | |
<body> | |
<div id="editor"></div> | |
<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script> | |
<script src="https://cdn.jsdelivr.net/combine/npm/@editorjs/[email protected],npm/@editorjs/[email protected]"></script> | |
<script src="./index.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const editor = new EditorJS({ | |
/** | |
* Id of Element that should contain Editor instance | |
*/ | |
holderId: 'editor', | |
tools: { | |
image: { | |
class: ImageTool, | |
config: { | |
endpoints: { | |
byFile: 'http://localhost:8008/uploadFile', // Your backend file uploader endpoint | |
byUrl: 'http://localhost:8008/fetchUrl', // Your endpoint that provides uploading by Url | |
} | |
} | |
}, | |
link: LinkTool | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment