1
Guys I am creating a standard model for reading XML and to facilitate the life of the system users, I am displaying a default model example in a modal with codemirror, however, it does not display at first, the code is only displayed when I click on the area of codemirror.
Method js codemirror
//codemirror
var editor_two = CodeMirror.fromTextArea(document.getElementById("code2"), {
lineNumbers: true,
matchBrackets: true,
styleActiveLine: true,
mode: "xml",
htmlMode: true,
});
//fim
Modal method
//exibe modal de xml padrao
$(".btnPadraoXml").on("click", function () {
//exibe modal
$("#myModalVisualizaModeloXMl").modal();
//tentativas sem sucesso
editor_two.focus();
//editor_two.on('shown');
})