Commit 7d96ba50 by Douglas Hall

Merge pull request #12446 from edx/ibrahimahmed443/WL-449-asset-image-fix

WL-499 Fix the issue where images do not appear when set through asset linki…
parents 5a372a2c 2a2560e3
......@@ -305,6 +305,8 @@ var DetailsView = ValidatingView.extend({
this.setField(event);
var url = $(event.currentTarget).val();
var image_name = _.last(url.split('/'));
// If image path is entered directly, we need to strip the asset prefix
image_name = _.last(image_name.split('block@'));
this.model.set(image_field, image_name);
// Wait to set the image src until the user stops typing
clearTimeout(this.imageTimer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment