An extensible code editor inspired by ded.
First, install the editor library with npm i https://github.com/neverUsedGithub/dje
. After installing the library, import it in a js file.
import Editor from "jde";
Then create an editor instance like this
new Editor({
// needs to be a canvas element or
// a selector to one.
element: ".editor",
// the content of the editor
content: `console.log("Hello, world!")`,
// a list of plugins the editor should use
plugins: [],
// the theme the editor should use
theme: {},
// size of tabs in spaces
tabSize: 2
})
The editor should now be displayed on your webpage! For an example, look at examples/basic
.