Commit bc34a2e8 authored by Jérome Perrin's avatar Jérome Perrin

ZMI editor patch: recognize typescript

parent ff7bb55d
...@@ -40,12 +40,16 @@ def manage_page_footer(self): ...@@ -40,12 +40,16 @@ def manage_page_footer(self):
if document.meta_type in ('DTML Document', 'DTML Method'): if document.meta_type in ('DTML Document', 'DTML Method'):
if document.getId().endswith('.js'): if document.getId().endswith('.js'):
mode = 'javascript' mode = 'javascript'
elif document.getId().endswith('.ts'):
mode = 'typescript'
elif document.getId().endswith('.css'): elif document.getId().endswith('.css'):
mode = 'css' mode = 'css'
textarea_selector = 'textarea[name="data:text"]' textarea_selector = 'textarea[name="data:text"]'
elif document.meta_type in ('File', ): elif document.meta_type in ('File', ):
if 'javascript' in document.getContentType(): if 'javascript' in document.getContentType():
mode = 'javascript' mode = 'javascript'
elif 'typescript' in document.getContentType():
mode = 'typescript'
elif 'css' in document.getContentType(): elif 'css' in document.getContentType():
mode = 'css' mode = 'css'
elif 'html' in document.getContentType(): elif 'html' in document.getContentType():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment