.uk-layui-form
    form.layui-form.uk-form(action='/admin/template/codesave.html')
        input(type='hidden', name='templettype', value=sysDic.id)
        input(type='hidden', name='id', value=template.id)
        .layui-form-item
            textarea#templettext(name='templettext', style='display:none;') template.templettext
            #editor= template.templettext
        .layui-form-button
            .layui-button-block
                button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交
                button.layui-btn.layui-btn-original(type='reset') 重置

script(language='javascript').
    $(document).ready(function () {
        var editor = ace.edit("editor");
        editor.setTheme("ace/theme/chrome");
        editor.getSession().setMode("ace/mode/xml");
        var textarea = $("#templettext");
        editor.getSession().on("change", function () {
            textarea.val(editor.getSession().getValue());
        });
    });

