client/posts: allow updating content from URL
This commit is contained in:
parent
b27855523a
commit
1e58899b03
1 changed files with 4 additions and 1 deletions
|
@ -72,10 +72,13 @@ class PostEditSidebarControl extends events.EventTarget {
|
||||||
|
|
||||||
if (this._contentInputNode) {
|
if (this._contentInputNode) {
|
||||||
this._contentFileDropper = new FileDropperControl(
|
this._contentFileDropper = new FileDropperControl(
|
||||||
this._contentInputNode, {lock: true});
|
this._contentInputNode, {allowUrls: true, lock: true});
|
||||||
this._contentFileDropper.addEventListener('fileadd', e => {
|
this._contentFileDropper.addEventListener('fileadd', e => {
|
||||||
this._newPostContent = e.detail.files[0];
|
this._newPostContent = e.detail.files[0];
|
||||||
});
|
});
|
||||||
|
this._contentFileDropper.addEventListener('urladd', e => {
|
||||||
|
this._newPostContent = e.detail.urls[0];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._thumbnailInputNode) {
|
if (this._thumbnailInputNode) {
|
||||||
|
|
Loading…
Reference in a new issue