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