sparksuite / simplemde-markdown-editor

A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://simplemde.com
MIT License
9.79k stars 1.12k forks source link

Cannot type inside the editor #750

Open pratamatama opened 5 years ago

pratamatama commented 5 years ago

I'm trying to use SimpleMDE as my blog content creation in Laravel but it seems that I can't type inside the editor and either no response from the console.log. Is there anything wrong in my configuration or something? It's hard to find the solution on Google so I decided to ask here. Please take a look at my script:

import 'simplemde/dist/simplemde.min.css';
import SimpleMDE from 'simplemde'

var simplemde = new SimpleMDE({
    element: document.getElementById('markdown-editor'),
    autosave: {
        enabled: true,
        delay: 60000,
        uniqueId: '_' + Math.random().toString(36).substr(2, 9)
    },
    forceSync: true,
    placeholder: "Write article here",
    renderingConfig: {
        codeSyntaxHighlighting: true
    },
    spellChecker: false,
})

simplemde.codemirror.on('change', function () {
    console.log(simplemde.value())
})

simplemde.value("This text will appear in the editor");
paulhennell commented 5 years ago

Did you resolve this? I'm also on laravel and having the same issue - seems to work when removing vue, but I can't work out how to get them both working at the same time.

(I'm actually using easyMDE, as this project seems dead; but equally had little luck finding many solutions on google)