aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/wiki.tpl
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-12-04 12:51:23 +0100
committerMario Vavti <mario@mariovavti.com>2016-12-04 12:51:23 +0100
commitb12d4c03cbc2627774b279f17a413860d868e854 (patch)
tree10acf01c398ad51bbf51e8f41ea4bda64963f122 /view/tpl/wiki.tpl
parent792527d456a031696f93015fb4fc91e60dee151b (diff)
downloadvolse-hubzilla-b12d4c03cbc2627774b279f17a413860d868e854.tar.gz
volse-hubzilla-b12d4c03cbc2627774b279f17a413860d868e854.tar.bz2
volse-hubzilla-b12d4c03cbc2627774b279f17a413860d868e854.zip
fixes for toc bbcode and bbcode wiki toc
Diffstat (limited to 'view/tpl/wiki.tpl')
-rw-r--r--view/tpl/wiki.tpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index cf4144357..7d698b493 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -184,7 +184,9 @@
function (data) {
if (data.success) {
$('#wiki-preview').html(data.html);
+ {{if !$mimeType || $mimeType == 'text/markdown'}}
$("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
+ {{/if}}
$('#page-tools').hide();
} else {
window.console.log('Error previewing page.');
@@ -418,13 +420,12 @@
$(document).ready(function () {
wiki_refresh_page_list();
- $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
-
// This seems obsolete
// Show Edit tab first. Otherwise the Ace editor does not load.
//$("#wiki-nav-tabs li:eq(1) a").tab('show');
{{if !$mimeType || $mimeType == 'text/markdown'}}
+ $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
window.editor.on("input", function() {
if(window.editor.getSession().getUndoManager().isClean()) {
$('#save-page').addClass('disabled');