Compare commits
2 Commits
89d9394a0f
...
47c76337ff
Author | SHA1 | Date | |
---|---|---|---|
![]() |
47c76337ff | ||
![]() |
da14011e5f |
@ -591,12 +591,14 @@ function handleReplaceTextAndInsertTableRow(data: any) {
|
|||||||
const text = Payload.text
|
const text = Payload.text
|
||||||
const table = Payload.table
|
const table = Payload.table
|
||||||
const tableData: any[] = []
|
const tableData: any[] = []
|
||||||
for (const tab_obj of table) {
|
if (table) {
|
||||||
tableData.push({
|
for (const tab_obj of table) {
|
||||||
location_bookmark_name: tab_obj.bookmarkName,
|
tableData.push({
|
||||||
start_row_index: tab_obj.startRowIndex,
|
location_bookmark_name: tab_obj.bookmarkName,
|
||||||
data: tab_obj.data,
|
start_row_index: tab_obj.startRowIndex,
|
||||||
})
|
data: tab_obj.data,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendMessageToWopiClient({
|
sendMessageToWopiClient({
|
||||||
MessageId: 'CallPythonScript',
|
MessageId: 'CallPythonScript',
|
||||||
@ -609,6 +611,7 @@ function handleReplaceTextAndInsertTableRow(data: any) {
|
|||||||
value: JSON.stringify({
|
value: JSON.stringify({
|
||||||
text,
|
text,
|
||||||
table: tableData,
|
table: tableData,
|
||||||
|
image: Payload?.image ? Payload?.image : [],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -620,12 +623,14 @@ function handleReplaceTextAndInsertTableRowWithContentControl(data: any) {
|
|||||||
const text = Payload.text
|
const text = Payload.text
|
||||||
const table = Payload.table
|
const table = Payload.table
|
||||||
const tableData: any[] = []
|
const tableData: any[] = []
|
||||||
for (const tab_obj of table) {
|
if (table) {
|
||||||
tableData.push({
|
for (const tab_obj of table) {
|
||||||
location_bookmark_name: tab_obj.bookmarkName,
|
tableData.push({
|
||||||
start_row_index: tab_obj.startRowIndex,
|
location_bookmark_name: tab_obj.bookmarkName,
|
||||||
data: tab_obj.data,
|
start_row_index: tab_obj.startRowIndex,
|
||||||
})
|
data: tab_obj.data,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendMessageToWopiClient({
|
sendMessageToWopiClient({
|
||||||
MessageId: 'CallPythonScript',
|
MessageId: 'CallPythonScript',
|
||||||
@ -638,6 +643,7 @@ function handleReplaceTextAndInsertTableRowWithContentControl(data: any) {
|
|||||||
value: JSON.stringify({
|
value: JSON.stringify({
|
||||||
text,
|
text,
|
||||||
table: tableData,
|
table: tableData,
|
||||||
|
image: Payload?.image ? Payload?.image : [],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user