fix: Allow embedding editable Grist

closes #6013
This commit is contained in:
Tom Moor
2023-12-26 21:41:07 -05:00
parent 083c32cb10
commit 4fd0e99909

View File

@@ -357,8 +357,13 @@ const embeds: EmbedDescriptor[] = [
name: IntegrationService.Grist,
keywords: "spreadsheet",
regexMatch: [new RegExp("^https?://([a-z.-]+\\.)?getgrist\\.com/(.+)$")],
transformMatch: (matches: RegExpMatchArray) =>
matches[0].replace(/(\?embed=true)?$/, "?embed=true"),
transformMatch: (matches: RegExpMatchArray) => {
if (matches[0].includes("style=singlePage")) {
return matches[0];
}
return matches[0].replace(/(\?embed=true)?$/, "?embed=true");
},
icon: <Img src="/images/grist.png" alt="Grist" />,
}),
new EmbedDescriptor({