fix markdown editor
This commit is contained in:
parent
f155466be8
commit
469dea540d
4 changed files with 44 additions and 46 deletions
|
@ -1,13 +1,6 @@
|
|||
# from django.contrib.auth.decorators import login_required
|
||||
from django.views import View
|
||||
from django.utils.timezone import now
|
||||
from django.shortcuts import render
|
||||
from django.db.models import BooleanField, Value
|
||||
from django.middleware.csrf import get_token
|
||||
from .preview import BlogMarkdownPreviewView
|
||||
|
||||
|
||||
# __all__ = ["MarkdownEditor"]
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class MarkdownEditor(View):
|
||||
|
@ -16,6 +9,6 @@ class MarkdownEditor(View):
|
|||
request,
|
||||
"markdown_editor/markdown_editor.html",
|
||||
{
|
||||
"title": ("Markdown Editor"),
|
||||
"title": _("Markdown Editor"),
|
||||
},
|
||||
)
|
||||
|
|
|
@ -130,6 +130,10 @@ msgstr "Thể thức"
|
|||
msgid "Rating"
|
||||
msgstr ""
|
||||
|
||||
#: templates/markdown_editor/markdown_editor.html:103
|
||||
msgid "Insert Image"
|
||||
msgstr "Chèn hình ảnh"
|
||||
|
||||
#: judge/admin/contest.py:201
|
||||
msgid "Access"
|
||||
msgstr "Truy cập"
|
||||
|
|
|
@ -39,6 +39,9 @@ msgstr "Đăng ký tên"
|
|||
msgid "Report"
|
||||
msgstr "Báo cáo"
|
||||
|
||||
msgid "Insert Image"
|
||||
msgstr "Chèn hình ảnh"
|
||||
|
||||
msgid "2sat"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
width: 51%;
|
||||
}
|
||||
.wmd-input {
|
||||
height: 678px;
|
||||
height: calc(100vh - 146px);
|
||||
}
|
||||
.right-markdown{
|
||||
height: 725px;
|
||||
height: calc(100vh - 100px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
|
@ -87,7 +87,6 @@
|
|||
<script src="{{ static('pagedown_math.js') }}"></script>
|
||||
|
||||
<div id="new-comment" class="form-area" style="">
|
||||
<form class="comment-submit-form" action="" method="post">
|
||||
<input type="hidden" name="csrfmiddlewaretoken" value="Ngk7TfY2iIW4e9cPitl05k1c7xNUsVk9kCTkrAFveVmmcIhjRKv4GLtItKANAvae">
|
||||
<input type="hidden" name="parent" id="id_parent">
|
||||
<div class="comment-post-wrapper">
|
||||
|
@ -101,7 +100,7 @@
|
|||
<div class="dmmd-preview-content content-description"></div>
|
||||
</div>
|
||||
<div class="pagedown-image-upload">
|
||||
<h2>Insert Image</h2>
|
||||
<h2>{{_('Insert Image')}}</h2>
|
||||
<div class="form-row">
|
||||
<div>
|
||||
<label class="label">From the web</label>
|
||||
|
@ -122,9 +121,8 @@
|
|||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="id_body-preview" data-preview-url="/widgets/preview/comment" data-textarea-id="wmd-input-id_body" data-timeout="1000" class="width-controller wmd-panel wmd-preview dmmd-preview dmmd-no-button dmmd-preview-has-content">
|
||||
<div id="id_body-preview" data-preview-url="{{url('comment_preview')}}" data-textarea-id="wmd-input-id_body" data-timeout="1000" class="width-controller wmd-panel wmd-preview dmmd-preview dmmd-no-button dmmd-preview-has-content">
|
||||
<div class="right-markdown dmmd-preview-content content-description" id="display"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue