admin: fix CodeMirror field not loading correctly
This commit is contained in:
		@ -47,11 +47,11 @@
 | 
				
			|||||||
        lineNumbers: true,
 | 
					        lineNumbers: true,
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    const templates = document.getElementsByName('template');
 | 
					    const expressions = document.getElementsByName('expression');
 | 
				
			||||||
    if (templates.length > 0) {
 | 
					    if (expressions.length > 0) {
 | 
				
			||||||
      // https://github.com/codemirror/CodeMirror/issues/5092
 | 
					      // https://github.com/codemirror/CodeMirror/issues/5092
 | 
				
			||||||
      templates[0].removeAttribute("required");
 | 
					      expressions[0].removeAttribute("required");
 | 
				
			||||||
      const templateCM = CodeMirror.fromTextArea(templates[0], {
 | 
					      const expressionCM = CodeMirror.fromTextArea(expressions[0], {
 | 
				
			||||||
        mode: 'jinja2',
 | 
					        mode: 'jinja2',
 | 
				
			||||||
        theme: 'monokai',
 | 
					        theme: 'monokai',
 | 
				
			||||||
        lineNumbers: true,
 | 
					        lineNumbers: true,
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user