Fixes the template editing as it was done in pull #2866 for creation.

Related to CachetHQ/Cachet#2749
This commit is contained in:
A
2018-02-23 10:27:29 +01:00
parent 2d8bf2fa79
commit 4dbd5aaef6

View File

@@ -9,13 +9,14 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/mode/twig/twig.min.js"></script>
<script>
(function() {
var editor = CodeMirror.fromTextArea(document.getElementById('cm-editor'), {
lineNumbers: true,
mode: 'twig',
lineWrapping: true
});
}());
//Initializes the editor only once the DOM is loaded.
window.addEventListener("DOMContentLoaded", function(e) {
var editor = CodeMirror.fromTextArea(document.getElementById('cm-editor'), {
lineNumbers: true,
mode: 'twig',
lineWrapping: true
});
});
</script>
@stop