1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-30 00:42:53 +00:00
seahub/templates/snippets/editor_set_mode.html
2012-08-09 20:45:29 +08:00

37 lines
1017 B
HTML

{% 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 %}