Answers for "How to apply CodeMirror in Bootstrap Modal"

0

How to apply CodeMirror in Bootstrap Modal

var myCodeMirror = CodeMirror(document.querySelector('.codemirror-init'), {
  value: 'Your Value',
  lineNumbers: true,
  tabSize: 2,
  mode: 'javascript',
  theme: 'monokai'
});

$('#exampleModal').on('shown.bs.modal', function() {
    // Refresh Code mirror Here
       myCodeMirror.refresh();
});
Posted by: Guest on June-25-2021

Code answers related to "How to apply CodeMirror in Bootstrap Modal"

Code answers related to "Javascript"

Browse Popular Code Answers by Language