Fixed toc update with partial rendering
This commit is contained in:
parent
29c7e6dd5f
commit
ffd9953d59
@ -116,10 +116,10 @@ define([
|
||||
|
||||
toc.onPagedownConfigure = function(editor) {
|
||||
previewContentsElt = document.getElementById('preview-contents');
|
||||
var tocEltList = document.querySelectorAll('.table-of-contents');
|
||||
var tocExp = new RegExp("^" + toc.config.marker + "$", "g");
|
||||
// Run TOC generation when conversion is finished directly on HTML
|
||||
editor.hooks.chain("onPreviewRefresh", function() {
|
||||
var tocEltList = document.querySelectorAll('.table-of-contents, .toc');
|
||||
var htmlToc = buildToc();
|
||||
// Replace toc paragraphs
|
||||
_.each(previewContentsElt.getElementsByTagName('p'), function(elt) {
|
||||
|
@ -6,9 +6,9 @@
|
||||
enabled
|
||||
</label>
|
||||
</div>
|
||||
<span data-toggle="collapse" data-parent=".accordion-extensions"
|
||||
<a data-toggle="collapse" data-parent=".accordion-extensions"
|
||||
class="accordion-toggle" href="#accordion-extensions-collapse-<%= extensionId %>">
|
||||
<%= extensionName %> </span>
|
||||
<%= extensionName %> </a>
|
||||
</div>
|
||||
<div id="accordion-extensions-collapse-<%= extensionId %>" class="collapse">
|
||||
<div class="accordion-inner clearfix"><%= settingsBlock %></div>
|
||||
|
@ -686,15 +686,6 @@ a {
|
||||
|
||||
.accordion-heading {
|
||||
padding: 12px 15px;
|
||||
.accordion-toggle {
|
||||
display: inline;
|
||||
padding: 0;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
.checkbox {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user