diff --git a/src/admin/templets/mychannel_edit.htm b/src/admin/templets/mychannel_edit.htm index 80ad9195..270a52a6 100644 --- a/src/admin/templets/mychannel_edit.htm +++ b/src/admin/templets/mychannel_edit.htm @@ -45,13 +45,16 @@ ShowObj('head1'); ShowObj('needset'); HideObj('head2'); HideObj('adset'); } + var editor = null; function ShowItem2() { setTimeout(() => { - var editor = CodeMirror.fromTextArea(document.getElementById('fieldset'), { - lineNumbers: true, - lineWrapping: true, - mode: 'text/html' - }); + if (!editor) { + editor = CodeMirror.fromTextArea(document.getElementById('fieldset'), { + lineNumbers: true, + lineWrapping: true, + mode: 'text/html' + }); + } }, 100); ShowObj('head2'); ShowObj('adset'); HideObj('head1'); HideObj('needset');