Fix comment edit

This commit is contained in:
cuom1999 2022-12-23 02:20:53 -06:00
parent 51707df439
commit a5f6d32977
2 changed files with 5 additions and 2 deletions

View file

@ -136,7 +136,10 @@ class CommentEditForm(ModelForm):
fields = ["body"]
widgets = {
"body": HeavyPreviewPageDownWidget(
id="id-edit-comment-body", preview=reverse_lazy("comment_preview")
id="id-edit-comment-body",
preview=reverse_lazy("comment_preview"),
preview_timeout=1000,
hide_preview_button=True,
),
}

View file

@ -167,7 +167,7 @@
afterOpen: function () {
register_dmmd_preview($('#id-edit-comment-body-preview'));
if ('DjangoPagedown' in window) {
var $wmd = $('.featherlight .wmd-input');
var $wmd = $('.featherlight .wmd-wrapper');
if ($wmd.length) {
window.DjangoPagedown.createEditor($wmd.get(0));
if ('MathJax' in window) {