|
@@ -114,14 +114,15 @@ class HtmlDocument extends React.Component {
|
114
|
114
|
})
|
115
|
115
|
}
|
116
|
116
|
|
117
|
|
- saveEditHtmlDocument = (label, rawContent) => fetch(`${this.state.config.apiUrl}/workspaces/${this.state.content.workspace_id}/html-documents/${this.state.content.content_id}`, {
|
118
|
|
- ...FETCH_CONFIG,
|
119
|
|
- method: 'PUT',
|
120
|
|
- body: JSON.stringify({
|
121
|
|
- label: label,
|
122
|
|
- raw_content: rawContent
|
|
117
|
+ saveEditHtmlDocument = (label, rawContent) =>
|
|
118
|
+ fetch(`${this.state.config.apiUrl}/workspaces/${this.state.content.workspace_id}/html-documents/${this.state.content.content_id}`, {
|
|
119
|
+ ...FETCH_CONFIG,
|
|
120
|
+ method: 'PUT',
|
|
121
|
+ body: JSON.stringify({
|
|
122
|
+ label: label,
|
|
123
|
+ raw_content: rawContent
|
|
124
|
+ })
|
123
|
125
|
})
|
124
|
|
- })
|
125
|
126
|
|
126
|
127
|
handleClickBtnCloseApp = () => {
|
127
|
128
|
this.setState({ isVisible: false })
|
|
@@ -220,7 +221,7 @@ class HtmlDocument extends React.Component {
|
220
|
221
|
mode={this.state.mode}
|
221
|
222
|
onClickCloseEditMode={this.handleCloseNewVersion}
|
222
|
223
|
onClickValidateBtn={this.handleSaveHtmlDocument}
|
223
|
|
- version={content.current_revision_id}
|
|
224
|
+ version={timeline.filter(t => t.timelineType === 'revision').length}
|
224
|
225
|
text={content.raw_content}
|
225
|
226
|
onChangeText={this.handleChangeText}
|
226
|
227
|
key={'html-documents'}
|