Clipper: Fixes #1026: Handle adding tag to clipped content after content has been clipped

pull/1034/head
Laurent Cozic 2018-12-06 23:50:02 +01:00
parent 3943192c5d
commit bb45d72a56
1 changed files with 4 additions and 7 deletions

View File

@ -18,7 +18,10 @@ class AppComponent extends Component {
});
this.confirm_click = () => {
bridge().sendContentToJoplin(this.props.clippedContent);
const content = Object.assign({}, this.props.clippedContent);
content.tags = this.state.selectedTags.join(',');
content.parent_id = this.props.selectedFolderId;
bridge().sendContentToJoplin(content);
}
this.contentTitle_change = (event) => {
@ -31,24 +34,18 @@ class AppComponent extends Component {
this.clipSimplified_click = () => {
bridge().sendCommandToActiveTab({
name: 'simplifiedPageHtml',
parent_id: this.props.selectedFolderId,
tags: this.state.selectedTags.join(','),
});
}
this.clipComplete_click = () => {
bridge().sendCommandToActiveTab({
name: 'completePageHtml',
parent_id: this.props.selectedFolderId,
tags: this.state.selectedTags.join(','),
});
}
this.clipSelection_click = () => {
bridge().sendCommandToActiveTab({
name: 'selectedHtml',
parent_id: this.props.selectedFolderId,
tags: this.state.selectedTags.join(','),
});
}