mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-06 04:38:33 +02:00
Encoding URI for images when added to the editor (fixes #31)
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
$("#gravDropzone").delegate('[data-dz-insert]', 'click', function(e) {
|
||||
var target = $(e.currentTarget).parent('.dz-preview').find('.dz-filename');
|
||||
editor.focus();
|
||||
editor.doc.replaceSelection(' + ')');
|
||||
editor.doc.replaceSelection(') + ')');
|
||||
});
|
||||
|
||||
this.preview.container = this.preview;
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
var dropzone = new Dropzone("#gravDropzone", { url: URI + '/task:addmedia', createImageThumbnails: { thumbnailWidth: 150} });
|
||||
|
||||
$("#gravDropzone").delegate('.dz-preview', 'dragstart', function(e){
|
||||
var uri = $(this).find('.dz-filename').text(), shortcode = '';
|
||||
var uri = $(this).find('.dz-filename').text(), shortcode = ' + ')';
|
||||
dropzone.disable();
|
||||
$(this).addClass('hide-backface');
|
||||
e.originalEvent.dataTransfer.effectAllowed = 'copy';
|
||||
|
||||
Reference in New Issue
Block a user