Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initEditor() {
this.editor = new Editor({
el: document.getElementById(this.id),
...this.editorOptions
})
if (this.value) {
this.editor.setMarkdown(this.value)
}
this.editor.on('change', () => {
this.$emit('input', this.editor.getMarkdown())
})
},
destroyEditor() {
const buildEditor = () => {
editor = new Editor({
el: document.body,
customHTMLRenderer: buildMarkdownToHTMLRenderer(),
});
registerHTMLToMarkdownRenderer(editor);
};