Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/js/medium-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3788,8 +3788,8 @@ MediumEditor.extensions = {};
// and provide similar access to a `fa-` icon default.
template.push(
'<div class="medium-editor-toolbar-form-row">',
'<input type="checkbox" class="medium-editor-toolbar-anchor-button">',
'<label>',
'<input type="checkbox" class="medium-editor-toolbar-anchor-button" id="medium-editor-toolbar-anchor-button-field-' + this.getEditorId() + '">',
'<label for="medium-editor-toolbar-anchor-button-field-' + this.getEditorId() + '">',
this.customClassOptionText,
'</label>',
'</div>'
Expand Down Expand Up @@ -7162,7 +7162,7 @@ MediumEditor.extensions = {};
}

if (action === 'image') {
var src = this.options.contentWindow.getSelection().toString().trim();
var src = this.options.contentWindow.getSelection().toString().trim() || opts.url;
return this.options.ownerDocument.execCommand('insertImage', false, src);
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
}

if (action === 'image') {
var src = this.options.contentWindow.getSelection().toString().trim();
var src = this.options.contentWindow.getSelection().toString().trim() || opts.url;
return this.options.ownerDocument.execCommand('insertImage', false, src);
}

Expand Down