mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-17 02:31:02 +01:00
Better MDEditor API with dynamic initialization to fully support lists. (look at window.MDEditors) (#239)
This commit is contained in:
@@ -490,6 +490,14 @@ $(function () {
|
||||
|
||||
holder.append(newItem);
|
||||
button.data('key-index', ++key);
|
||||
|
||||
// process markdown editors
|
||||
var field = newItem.find('[name]').filter('textarea'),
|
||||
name = field.attr('name');
|
||||
|
||||
if (field.length && field.data('grav-mdeditor') && typeof MDEditors !== 'undefined') {
|
||||
MDEditors.add(field);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user