Factor out markdown widget rendering

This commit is contained in:
Zef Hemel
2023-10-29 10:02:50 +01:00
parent 23e99b0c46
commit 50caba8522
17 changed files with 102 additions and 77 deletions
+1
View File
@@ -54,6 +54,7 @@ export type CompleteEvent = {
export type WidgetContent = {
html?: string;
script?: string;
markdown?: string;
url?: string;
height?: number;
width?: number;
+11
View File
@@ -115,3 +115,14 @@ export type ObjectValue<T> = {
} & T;
export type ObjectQuery = Omit<Query, "prefix">;
// Code widget stuff
export type CodeWidgetCallback = (
bodyText: string,
) => Promise<CodeWidgetContent>;
export type CodeWidgetContent = {
html?: string;
markdown?: string;
script?: string;
};