client/posts: allow updating content from URL

This commit is contained in:
rr- 2017-02-21 18:30:19 +01:00
parent b27855523a
commit 1e58899b03

View file

@ -72,10 +72,13 @@ class PostEditSidebarControl extends events.EventTarget {
if (this._contentInputNode) {
this._contentFileDropper = new FileDropperControl(
this._contentInputNode, {lock: true});
this._contentInputNode, {allowUrls: true, lock: true});
this._contentFileDropper.addEventListener('fileadd', e => {
this._newPostContent = e.detail.files[0];
});
this._contentFileDropper.addEventListener('urladd', e => {
this._newPostContent = e.detail.urls[0];
});
}
if (this._thumbnailInputNode) {