Compare commits

...

2 Commits

Author SHA1 Message Date
zzs
47c76337ff feat: image replace 2025-03-28 11:57:37 +08:00
zzs
da14011e5f wip: table error 2025-03-27 15:48:21 +08:00

View File

@ -591,6 +591,7 @@ function handleReplaceTextAndInsertTableRow(data: any) {
const text = Payload.text
const table = Payload.table
const tableData: any[] = []
if (table) {
for (const tab_obj of table) {
tableData.push({
location_bookmark_name: tab_obj.bookmarkName,
@ -598,6 +599,7 @@ function handleReplaceTextAndInsertTableRow(data: any) {
data: tab_obj.data,
})
}
}
sendMessageToWopiClient({
MessageId: 'CallPythonScript',
SendTime: Date.now(),
@ -609,6 +611,7 @@ function handleReplaceTextAndInsertTableRow(data: any) {
value: JSON.stringify({
text,
table: tableData,
image: Payload?.image ? Payload?.image : [],
}),
},
},
@ -620,6 +623,7 @@ function handleReplaceTextAndInsertTableRowWithContentControl(data: any) {
const text = Payload.text
const table = Payload.table
const tableData: any[] = []
if (table) {
for (const tab_obj of table) {
tableData.push({
location_bookmark_name: tab_obj.bookmarkName,
@ -627,6 +631,7 @@ function handleReplaceTextAndInsertTableRowWithContentControl(data: any) {
data: tab_obj.data,
})
}
}
sendMessageToWopiClient({
MessageId: 'CallPythonScript',
SendTime: Date.now(),
@ -638,6 +643,7 @@ function handleReplaceTextAndInsertTableRowWithContentControl(data: any) {
value: JSON.stringify({
text,
table: tableData,
image: Payload?.image ? Payload?.image : [],
}),
},
},