CodeMirror textarea.getAttribute no es un error de función en la aplicación mvc3
Im using codemirror in my ASP.NET MVC 3 application, codemirror
s versión está actualizada (2.34)
mi TextArea se ve así:
@Html.TextAreaFieldFor(s => s.Data.CodeBehind, htmlAttributes: new Dictionary<string, object> { { "class", "textbox codeBehind nffp-code" } })
Yo uso codemirror de esta manera:
var a = CodeMirror.fromTextArea($code, {
lineNumbers: true,
matchBrackets: true,
mode: "text/x-csharp"
});
donde $ código es
var $code = jQuery('.nffp-code', $root);
Y después de cargar la página tengo este error:
TypeError: textarea.getAttribute no es una función codemirror.js Line 2209 textarea.getAttribute ("autofocus")! = Null && hasFocus == document.body;
Utilicé este manual para usar codemirror:manual
Incluso el pensamiento, yom a total noob in JS, I guess it
Es difícil hacerlo mal, todavía lo hice.
¿Alguna idea de cómo arreglar el problema?