Fixed multiple instances of Markdown Editor (fixes #285)

This commit is contained in:
Djamil Legato
2015-11-19 17:58:50 -08:00
parent 2d34f776be
commit 69f883823a

View File

@@ -530,11 +530,12 @@
// init // init
$(function(){ $(function(){
var editor;
$('textarea[data-grav-mdeditor]').each(function() { $('textarea[data-grav-mdeditor]').each(function() {
var editor = $(this), obj; editor = $(this);
if (!editor.data('mdeditor')) { if (!editor.data('mdeditor')) {
obj = MDEditor(editor, JSON.parse(editor.attr('data-grav-mdeditor') || '{}')); new MDEditor(editor, JSON.parse(editor.attr('data-grav-mdeditor') || '{}'));
} }
}); });
}) })