Upgrade pagedown
This commit is contained in:
parent
ab64ab6134
commit
1ef68e0fdb
8 changed files with 61 additions and 25 deletions
|
@ -161,15 +161,13 @@
|
|||
|
||||
$comments.find('a.edit-link').featherlight({
|
||||
afterOpen: function () {
|
||||
register_dmmd_preview($('#id-edit-comment-body-preview'));
|
||||
if ('DjangoPagedown' in window) {
|
||||
var $wmd = $('.featherlight .wmd-input');
|
||||
if ($wmd.length) {
|
||||
window.DjangoPagedown.createEditor($wmd.get(0));
|
||||
if ('MathJax' in window) {
|
||||
var preview = $('.featherlight div.wmd-preview')[0];
|
||||
window.editors[$wmd.attr('id')].hooks.chain('onPreviewRefresh', function () {
|
||||
MathJax.Hub.Queue(['Typeset', MathJax.Hub, preview]);
|
||||
});
|
||||
MathJax.Hub.Queue(['Typeset', MathJax.Hub, preview]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue