1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-01 01:12:41 +00:00
seahub/templates/snippets/editor_set_mode.html

37 lines
1017 B
HTML
Raw Normal View History

2012-08-06 12:29:14 +00:00
{% if fileext = 'html' or fileext == 'xhtml' or fileext == 'htm' %}
editor.session.setMode('ace/mode/html');
{% endif %}
{% if fileext = 'css' %}
editor.session.setMode('ace/mode/css');
{% endif %}
{% if fileext = 'java' %}
editor.session.setMode('ace/mode/java');
{% endif %}
{% if fileext = 'js' %}
editor.session.setMode('ace/mode/javascript');
{% endif %}
{% if fileext = 'c' or fileext == 'cpp' or fileext == 'cc' %}
editor.session.setMode('ace/mode/c_cpp');
{% endif %}
{% if fileext = 'tex' %}
editor.session.setMode('ace/mode/latex');
{% endif %}
{% if fileext = 'pl' %}
editor.session.setMode('ace/mode/perl');
{% endif %}
{% if fileext = 'php' %}
editor.session.setMode('ace/mode/php');
{% endif %}
{% if fileext = 'py' %}
editor.session.setMode('ace/mode/python');
{% endif %}
{% if fileext = 'rb' %}
editor.session.setMode('ace/mode/ruby');
{% endif %}
{% if fileext = 'sh' %}
editor.session.setMode('ace/mode/sh');
{% endif %}
{% if fileext = 'xml' %}
editor.session.setMode('ace/mode/xml');
{% endif %}