Index: branches/2.2/plugins/LocalFilesEditor/admin.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/admin.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/admin.php	(revision 10311)
@@ -361,5 +361,4 @@
   'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin-LocalFilesEditor-'.$page['tab'],
   'LOCALEDIT_PATH' => LOCALEDIT_PATH,
-  'LOAD_CODEMIRROR' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'off',
   'CODEMIRROR_MODE' => @$codemirror_mode
   )
Index: branches/2.2/plugins/LocalFilesEditor/admin.tpl
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/admin.tpl	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/admin.tpl	(revision 10311)
@@ -15,23 +15,9 @@
 
 {footer_script}
-function loadCodemirror() {ldelim}
-  editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim}
-    matchBrackets: true,
-    mode: "{$CODEMIRROR_MODE}",
-    tabMode: "shift"
-  });
-  jQuery("#showedit, #hideedit").toggle();
-  jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "on"});
-}
-
-function unloadCodemirror() {ldelim} 
-  editor.toTextArea();
-  jQuery("#showedit, #hideedit").toggle();
-  jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "off"});
-}
-
-{if $LOAD_CODEMIRROR == 'on'}
-if (document.getElementById("text") != null) loadCodemirror();
-{/if}
+var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim}
+  matchBrackets: true,
+  mode: "{$CODEMIRROR_MODE}",
+  tabMode: "shift"
+});
 {/footer_script}
 
@@ -92,8 +78,4 @@
 
 <textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea>
-<div id="editarea_buttons">
-<a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a>
-<a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a>
-</div>
 
 <br>
Index: branches/2.2/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php	(revision 10311)
@@ -51,6 +51,3 @@
 $lang['locfiledit_empty_filename'] = 'يجب كتابة أسم الملف';
 $lang['locfiledit_webmaster_only'] = 'فقط مدير الموقع يمكن استخدام محرر الملفات المحلي';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Musíte vyplnit název souboru.';
 $lang['locfiledit_webmaster_only'] = 'Pouze webmaster může vytvářet nebo měnit lokální soubory.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Sie müssen einen Dateiname eingeben.';
 /* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'You must fill file name.';
 $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
-
-$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Por favor, indique un nombre de archivo.';
 $lang['locfiledit_webmaster_only'] = 'Sólo los administradores pueden crear o modificar fichero locales.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Veuillez indiquer un nom de fichier.';
 $lang['locfiledit_webmaster_only'] = 'Seuls les webmasters sont autorisés à créer ou modifier les fichiers locaux.';
-
-$lang['locfiledit_enable_codemirror'] = 'Activer Codemirror';
-$lang['locfiledit_disable_codemirror'] = 'Désactiver Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_webmaster_only'] = 'רק מנהל האתר יכול ליצור או לשנות קבצים מקומיים.';
 $lang['locfiledit_filename_error'] = 'אסור להשתמש בתווים מסויימים בשם הקובץ.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php	(revision 10311)
@@ -50,6 +50,3 @@
 $lang['locfiledit_empty_filename'] = 'Morate popuniti naziv datoteke.';
 $lang['locfiledit_webmaster_only'] = 'Samo webmasteri mogu kreirati ili mijenjati lokalne datoteke.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'A fájlnevet ki kell tölteni.';
 /* TODO */ $lang['locfiledit_webmaster_only'] = 'Csak a webmesterek hozhatnak létre, vagy módosíthatnak helyi fájlokat.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Indicate un nome di file.';
 $lang['locfiledit_webmaster_only'] = 'Solo i webmasters sono autorizzati a creare o modificare i file locali.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'ファイル名を記入する必要があります。';
 $lang['locfiledit_webmaster_only'] = 'ローカルファイルはウェブマスターのみ作成するか、変更できます。';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'თქვენ უნდა შეავსოთ ფაილის სახელი.';
 $lang['locfiledit_webmaster_only'] = 'მხოლოდ ვებოსტატებს შეუძლიათ შექმნან ან გადააკეთონ ლოკალური ფაილები.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Jums jaieraksta faila nosaukums.';
 $lang['locfiledit_webmaster_only'] = 'Tikai webmasters var izveidot un modificet lokalos failus.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'U moet een bestandsnaam opgeven.';
 $lang['locfiledit_webmaster_only'] = 'Alleen webbeheerders kunnen lokale bestanden aanmaken of wijzigen.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php	(revision 10311)
@@ -49,6 +49,3 @@
 $lang['locfiledit_empty_filename'] = 'Du må fylle inn fil navnet.';
 $lang['locfiledit_webmaster_only'] = 'Kun webmaster kan lage eller endre lokale filer.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Musisz wpisać nazwę pliku.';
 /* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Tem que preencher o Nome do ficheiro.';
 $lang['locfiledit_webmaster_only'] = 'Apenas webmasters podem criar ou modificar ficheiros locais.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php	(revision 10311)
@@ -51,6 +51,3 @@
 $lang['locfiledit_empty_filename'] = 'Заполните поле "Имя файла".';
 $lang['locfiledit_webmaster_only'] = 'Только вэбмастеры могут создавать или редактировать локальные файлы.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Musíte zadať meno súboru.';
 $lang['locfiledit_webmaster_only'] = 'Len webmasteri môžu vytvoriť alebo modifikovať lokálne súbory.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php	(revision 10311)
@@ -51,6 +51,3 @@
 $lang['locfiledit_empty_filename']      = 'Морате уписати име датотеке.';
 $lang['locfiledit_webmaster_only']      = 'Само уредник интернет страница може да направи или уреди локалне датотеке.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php	(revision 10311)
@@ -51,6 +51,3 @@
 $lang['locfiledit_empty_filename'] = 'Du måste välja ett filnamn.';
 $lang['locfiledit_webmaster_only'] = 'Endast webmasters kan skapa eller ändra lokala filer.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php	(revision 10311)
@@ -52,6 +52,3 @@
 $lang['locfiledit_empty_filename'] = 'Adi doldurmak zorundasin.';
 $lang['locfiledit_webmaster_only'] = 'Sadece yöneticiler dosyalari degistirebilir .';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php	(revision 10311)
@@ -51,6 +51,3 @@
 $lang['locfiledit_empty_filename'] = 'Bạn phải điền đủ tên tệp tin.';
 $lang['locfiledit_webmaster_only'] = 'Chỉ có webmasters mới có thể tạo hoặc biên tập tệp tin trên máy.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php	(revision 10311)
@@ -51,6 +51,3 @@
 $lang['locfiledit_empty_filename'] = '您必须填写文件名.';
 $lang['locfiledit_webmaster_only'] = '只有网站管理员才能创建或者修改本地文件.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
 ?>
Index: branches/2.2/plugins/LocalFilesEditor/locfiledit.css
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/locfiledit.css	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/locfiledit.css	(revision 10311)
@@ -20,14 +20,4 @@
 }
 
-#LocalFilesEditor #editarea_buttons {
-  width: 100%;
-  float: left;
-  text-align: left;
-}
-
-#LocalFilesEditor #hideedit {
-  display: none;
-}
-
 #LocalFilesEditor TD {
   padding: 0.5em;
@@ -35,5 +25,5 @@
 
 .CodeMirror {
-  background-color: #DDDDDD;
+  background-color: #EEEEEE;
   font-size: 1.3em;
   border: 1px solid #999999;
Index: branches/2.2/plugins/LocalFilesEditor/maintain.inc.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/maintain.inc.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/maintain.inc.php	(revision 10311)
@@ -22,15 +22,4 @@
 // +-----------------------------------------------------------------------+
 
-function plugin_install()
-{
-  global $prefixeTable;
-
-  $query = '
-INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-VALUES (\'LocalFilesEditor\' , \'off\' , \'LocalFiles Editor plugin parameters\');';
-
-  pwg_query($query);
-}
-
 function plugin_uninstall()
 {
Index: branches/2.2/plugins/LocalFilesEditor/show_default.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/show_default.php	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/show_default.php	(revision 10311)
@@ -46,5 +46,4 @@
     'DEFAULT_CONTENT' => $file,
     'LOCALEDIT_PATH' => LOCALEDIT_PATH,
-    'LOAD_CODEMIRROR' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'on',
     'CODEMIRROR_MODE' => 'application/x-httpd-php'
     )
Index: branches/2.2/plugins/LocalFilesEditor/show_default.tpl
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/show_default.tpl	(revision 10310)
+++ branches/2.2/plugins/LocalFilesEditor/show_default.tpl	(revision 10311)
@@ -20,26 +20,10 @@
 
 {footer_script}
-function loadCodemirror() {ldelim}
-  editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim}
-    matchBrackets: true,
-    readOnly: true,
-    mode: "{$CODEMIRROR_MODE}",
-    tabMode: "shift"
-  });
-  jQuery("#showedit").hide();
-  jQuery("#hideedit").show();
-  jQuery.post("update_config.php", {ldelim} editarea: "on"});
-}
-
-function unloadCodemirror() {ldelim} 
-  editor.toTextArea();
-  jQuery("#hideedit").hide();
-  jQuery("#showedit").show();
-  jQuery.post("update_config.php", {ldelim} editarea: "off"});
-}
-
-{if $LOAD_CODEMIRROR == 'on'}
-if (document.getElementById("text") != null) loadCodemirror();
-{/if}
+var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim}
+  matchBrackets: true,
+  readOnly: true,
+  mode: "{$CODEMIRROR_MODE}",
+  tabMode: "shift"
+});
 {/footer_script}
 
@@ -49,8 +33,3 @@
 <textarea id="text" rows="30" cols="90">{$DEFAULT_CONTENT}</textarea>
 
-<div id="editarea_buttons">
-<a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a>
-<a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a>
 </div>
-
-</div>
Index: branches/2.2/plugins/LocalFilesEditor/update_config.php
===================================================================
--- branches/2.2/plugins/LocalFilesEditor/update_config.php	(revision 10310)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH', '../../');
-include_once(PHPWG_ROOT_PATH . 'include/common.inc.php');
-include_once(LOCALEDIT_PATH.'functions.inc.php');
-check_status(ACCESS_ADMINISTRATOR);
-
-$possible_values = array('on', 'off');
-
-if (isset($_POST['editarea']) and in_array($_POST['editarea'], $possible_values))
-{
-  if (!isset($conf['LocalFilesEditor']))
-  {
-    include_once(LOCALEDIT_PATH.'maintain.inc.php');
-    plugin_install();
-  }
-  $query = '
-UPDATE ' . CONFIG_TABLE . '
-SET value = \'' . $_POST['editarea'] . '\'
-WHERE param=\'LocalFilesEditor\'
-LIMIT 1';
-  pwg_query($query);
-}
-
-?>
