From 3d7289b9357c11e5ebce2922df734c20b1c4b9e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 15 May 2015 09:07:00 +0200
Subject: [PATCH] codemirror: support html files in ZMI

---
 product/ERP5Type/patches/AceEditorZMI.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/product/ERP5Type/patches/AceEditorZMI.py b/product/ERP5Type/patches/AceEditorZMI.py
index ac19619c1c..735cce1307 100644
--- a/product/ERP5Type/patches/AceEditorZMI.py
+++ b/product/ERP5Type/patches/AceEditorZMI.py
@@ -51,6 +51,11 @@ def manage_page_footer(self):
       mode = 'javascript'
     elif 'css' in document.getContentType():
       mode = 'css'
+    elif 'html' in document.getContentType():
+      if editor == 'codemirror':
+        mode = 'htmlmixed'
+      else:
+        mode = 'html'
     textarea_selector = 'textarea[name="filedata:text"]'
   elif document.meta_type in ('Script (Python)', ):
     mode = 'python'
-- 
2.30.9