I am creating a standard template for reading XML and to make life easier for system users, I am displaying a sample default template in a modal with the codemirror, however, it does not display at first, the code is only displayed when I click the codemirror area.
jscodemirrormethod
//codemirrorvareditor_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');
})