Markdown editor improvements (#87)
This commit is contained in:
parent
458b9e425e
commit
49d1bc2e1b
1 changed files with 56 additions and 47 deletions
|
@ -2,20 +2,19 @@
|
|||
|
||||
{% block media %}
|
||||
<style>
|
||||
main {
|
||||
main{
|
||||
overflow: hidden;
|
||||
}
|
||||
#content {
|
||||
#content{
|
||||
width: 100%;
|
||||
}
|
||||
#content.wrapper {
|
||||
#content.wrapper{
|
||||
padding: 0;
|
||||
}
|
||||
.form-area {
|
||||
.form-area{
|
||||
float: left;
|
||||
width: 47%;
|
||||
height: 100%
|
||||
|
||||
}
|
||||
.wmd-preview{
|
||||
float: right;
|
||||
|
@ -24,13 +23,16 @@
|
|||
.width-controller{
|
||||
width: 51%;
|
||||
}
|
||||
.wmd-input {
|
||||
height: calc(100vh - 114px);
|
||||
.wmd-input{
|
||||
height: calc(100vh - 72px);
|
||||
}
|
||||
.right-markdown{
|
||||
height: calc(100vh - 69px);
|
||||
height: calc(100vh - 72px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.wrap{
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -49,13 +51,15 @@
|
|||
preview: $(this).val()
|
||||
},
|
||||
success: function(data) {
|
||||
$('#display').html(data)
|
||||
$('#display').html(data);
|
||||
MathJax.typeset();
|
||||
},
|
||||
error: function(error) {
|
||||
alert(error);
|
||||
console.log(error.message)
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -90,8 +94,12 @@
|
|||
{% block title_row %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title_ruler %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="new-comment" class="form-area" style="">
|
||||
<div class="wrap">
|
||||
<div id="new-comment" class="form-area">
|
||||
<input type="hidden" name="parent" id="id_parent">
|
||||
<div class="comment-post-wrapper">
|
||||
<div id="comment-form-body"><div class="wmd-wrapper image-upload-enabled">
|
||||
|
@ -130,5 +138,6 @@
|
|||
<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>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue