Help me with integrating vim mode in the editor

I can create a simple textarea with vim mode. But I can not figure out how to integrate it with discourse editor. Please help me!

The below is the example code for producing the textarea with vim mode.

<!DOCTYPE html>
    <title>Vim Mode Editor</title>
    <script src=""></script>
    <script src=""></script>
    <link rel="stylesheet" href="">
    <textarea id="editor"></textarea>

        var editor = CodeMirror.fromTextArea(document.getElementById("editor"), {
            lineNumbers: true,
            mode: "javascript",
            keyMap: "vim"

Thanks for any possible help!

Any help? :grinning: