Factor out markdown widget rendering
This commit is contained in:
@@ -54,6 +54,7 @@ export type CompleteEvent = {
|
||||
export type WidgetContent = {
|
||||
html?: string;
|
||||
script?: string;
|
||||
markdown?: string;
|
||||
url?: string;
|
||||
height?: number;
|
||||
width?: number;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user