mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-21 21:01:30 +08:00
Lexical: Finished up core drawing insert/editing
Added new options that sits on the context, for things needed but not for the core editor, which are defined out of the editor (drawio URL, error message text, pageId etc...)
This commit is contained in:
@ -127,13 +127,13 @@ export async function show(drawioUrl: string, onInitCallback: () => Promise<stri
|
||||
lastApprovedOrigin = (new URL(drawioUrl)).origin;
|
||||
}
|
||||
|
||||
export async function upload(imageData: string, pageUploadedToId: string): Promise<{}|string> {
|
||||
export async function upload(imageData: string, pageUploadedToId: string): Promise<{id: number, url: string}> {
|
||||
const data = {
|
||||
image: imageData,
|
||||
uploaded_to: pageUploadedToId,
|
||||
};
|
||||
const resp = await window.$http.post(window.baseUrl('/images/drawio'), data);
|
||||
return resp.data;
|
||||
return resp.data as {id: number, url: string};
|
||||
}
|
||||
|
||||
export function close() {
|
||||
|
Reference in New Issue
Block a user