mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-12 00:06:04 +01:00
Added support for markdown editor within lists (fixes #239)
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -454,7 +454,7 @@ $(function () {
|
|||||||
|
|
||||||
// make sortable
|
// make sortable
|
||||||
new Sortable(holder[0], {
|
new Sortable(holder[0], {
|
||||||
filter: '.form-input-wrapper',
|
filter: '.form-input-wrapper, .form-markdown-wrapper',
|
||||||
onUpdate: function () {
|
onUpdate: function () {
|
||||||
if (isArray)
|
if (isArray)
|
||||||
reIndex(el);
|
reIndex(el);
|
||||||
|
|||||||
@@ -45,6 +45,11 @@
|
|||||||
&:first-child a {
|
&:first-child a {
|
||||||
border-top-left-radius: 4px;
|
border-top-left-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
padding: inherit !important;
|
||||||
|
margin: inherit !important;
|
||||||
|
border-radius: inherit !important;
|
||||||
|
border: inherit !important;
|
||||||
}
|
}
|
||||||
.mdeditor-active a {
|
.mdeditor-active a {
|
||||||
background: white;
|
background: white;
|
||||||
@@ -88,6 +93,7 @@
|
|||||||
.grav-mdeditor-content {
|
.grav-mdeditor-content {
|
||||||
|
|
||||||
@include clearfix;
|
@include clearfix;
|
||||||
|
cursor: text;
|
||||||
border: 1px solid $form-border;
|
border: 1px solid $form-border;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
border-bottom-right-radius: $form-border-radius;
|
border-bottom-right-radius: $form-border-radius;
|
||||||
|
|||||||
@@ -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>
|
<button class="button" type="button" data-action="add" data-key-index="{{ lastKey }}"><i class="fa fa-plus"></i> Add item</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/html" data-collection-template="new">
|
<ul style="display: none;" data-collection-template="new">
|
||||||
<li data-collection-item="{{ name ~ '.*' }}">
|
<li data-collection-item="{{ name ~ '.*' }}">
|
||||||
{% if field.fields %}
|
{% if field.fields %}
|
||||||
{% set itemName = name ~ '.*' %}
|
{% set itemName = name ~ '.*' %}
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
</script>
|
</ul>
|
||||||
|
|
||||||
<div style="display: none;" data-collection-config="{{ name }}" data-collection-array="{{ array ? 'true' : 'false' }}"></div>
|
<div style="display: none;" data-collection-config="{{ name }}" data-collection-array="{{ array ? 'true' : 'false' }}"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user