Added support for markdown editor within lists (fixes #239)

This commit is contained in:
Djamil Legato
2015-11-24 16:45:20 -08:00
parent 925fe14d7b
commit b7caab8677
5 changed files with 11 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -454,7 +454,7 @@ $(function () {
// make sortable
new Sortable(holder[0], {
filter: '.form-input-wrapper',
filter: '.form-input-wrapper, .form-markdown-wrapper',
onUpdate: function () {
if (isArray)
reIndex(el);

View File

@@ -45,6 +45,11 @@
&:first-child a {
border-top-left-radius: 4px;
}
padding: inherit !important;
margin: inherit !important;
border-radius: inherit !important;
border: inherit !important;
}
.mdeditor-active a {
background: white;
@@ -88,6 +93,7 @@
.grav-mdeditor-content {
@include clearfix;
cursor: text;
border: 1px solid $form-border;
border-top: 0;
border-bottom-right-radius: $form-border-radius;

View File

@@ -67,7 +67,7 @@
<button class="button" type="button" data-action="add" data-key-index="{{ lastKey }}"><i class="fa fa-plus"></i> Add item</button>
</div>
<script type="text/html" data-collection-template="new">
<ul style="display: none;" data-collection-template="new">
<li data-collection-item="{{ name ~ '.*' }}">
{% if field.fields %}
{% set itemName = name ~ '.*' %}
@@ -102,7 +102,7 @@
</div>
{% endif %}
</li>
</script>
</ul>
<div style="display: none;" data-collection-config="{{ name }}" data-collection-array="{{ array ? 'true' : 'false' }}"></div>
</div>