mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 14:42:10 +00:00
[md] modified js for history/shared file view
This commit is contained in:
@@ -46,7 +46,8 @@ window.onload = function () {
|
||||
|
||||
{% if filetype == 'Markdown' %}
|
||||
{% ifnotequal file_content None %}
|
||||
var converter = new Showdown.converter();
|
||||
var converter = new Markdown.Converter();
|
||||
Markdown.Extra.init(converter, {extensions: ["fenced_code_gfm"]});
|
||||
$('#md-view').html(converter.makeHtml('{{ file_content|escapejs }}')).children(':first').css('margin-top', '0');
|
||||
{% endifnotequal %}
|
||||
{% endif %}
|
||||
|
@@ -11,5 +11,6 @@
|
||||
<script src="{{MEDIA_URL}}js/mediaelement-and-player.min.js"></script>
|
||||
{% endif %}
|
||||
{% if filetype == 'Markdown' %}
|
||||
<script type="text/javascript" src="{{MEDIA_URL}}js/showdown.js"></script>
|
||||
<script type="text/javascript" src="{{MEDIA_URL}}js/Markdown.Converter.js"></script>
|
||||
<script type="text/javascript" src="{{MEDIA_URL}}js/Markdown.Extra.js"></script>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user