Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit fa7c554

Browse files
committed
Merge pull request #102 from flamerohr/placeholder-fix
added check to preparePreviousImages
2 parents 9b1a5c3 + 19f41b7 commit fa7c554

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/js/medium-editor-insert-images.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@
138138
preparePreviousImages: function () {
139139
this.$el.find('.mediumInsert-images').each(function() {
140140
var $parent = $(this).parent();
141-
$parent.html($.fn.mediumInsert.insert.getButtons('images') +
142-
'<div class="mediumInsert-placeholder" draggable="true">' + $parent.html() + '</div>'
143-
);
141+
if (!$parent.hasClass('mediumInsert-placeholder')) {
142+
$parent.html($.fn.mediumInsert.insert.getButtons('images') +
143+
'<div class="mediumInsert-placeholder" draggable="true">' + $parent.html() + '</div>'
144+
);
145+
}
144146
});
145147
},
146148

0 commit comments

Comments
 (0)