Codemirror: codemirror.js:348 Uncaught TypeError: place is not a function

Created on 27 Jan 2018  路  4Comments  路  Source: codemirror/CodeMirror

codemirror-5.30.0,how to solve this problem?

codemirror.js:348 Uncaught TypeError: place is not a function
    at new Display (codemirror.js:348)
    at new CodeMirror (codemirror.js:7733)
    at CodeMirror (codemirror.js:7721)
    at Object.success (55:162)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at y (jquery.min.js:4)
    at XMLHttpRequest.c (jquery.min.js:4)

Most helpful comment

The docs tell you to pass a DOM node, a function, or null. That's a jQuery object, which isn't something that CodeMirror can work with.

All 4 comments

What did you pass as first argument to CodeMirror?

$("textarea")

The docs tell you to pass a DOM node, a function, or null. That's a jQuery object, which isn't something that CodeMirror can work with.

Please try to use
$("#textarea")[0]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marvindanig picture marvindanig  路  5Comments

KnightYoshi picture KnightYoshi  路  6Comments

hameddhib-dydu picture hameddhib-dydu  路  5Comments

droidenator picture droidenator  路  3Comments

ellisonbg picture ellisonbg  路  4Comments