Fix comment edit
This commit is contained in:
parent
51707df439
commit
a5f6d32977
2 changed files with 5 additions and 2 deletions
|
@ -136,7 +136,10 @@ class CommentEditForm(ModelForm):
|
||||||
fields = ["body"]
|
fields = ["body"]
|
||||||
widgets = {
|
widgets = {
|
||||||
"body": HeavyPreviewPageDownWidget(
|
"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,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
afterOpen: function () {
|
afterOpen: function () {
|
||||||
register_dmmd_preview($('#id-edit-comment-body-preview'));
|
register_dmmd_preview($('#id-edit-comment-body-preview'));
|
||||||
if ('DjangoPagedown' in window) {
|
if ('DjangoPagedown' in window) {
|
||||||
var $wmd = $('.featherlight .wmd-input');
|
var $wmd = $('.featherlight .wmd-wrapper');
|
||||||
if ($wmd.length) {
|
if ($wmd.length) {
|
||||||
window.DjangoPagedown.createEditor($wmd.get(0));
|
window.DjangoPagedown.createEditor($wmd.get(0));
|
||||||
if ('MathJax' in window) {
|
if ('MathJax' in window) {
|
||||||
|
|
Loading…
Reference in a new issue