feat: excalidraw integration (#214)
* update tiptap version * excalidraw init * cleanup * better file handling and other fixes * use different modal to fix excalidraw cursor position issue * see https://github.com/excalidraw/excalidraw/issues/7312 * fix websocket in vite dev mode * WIP * add align attribute * fix table * menu icons * Render image in excalidraw html * add size to custom SVG components * rewrite undefined font urls
This commit is contained in:
@@ -44,3 +44,11 @@ export const formatBytes = (
|
||||
|
||||
return `${adjustedSize.toFixed(precision)} ${units[adjustedUnitIndex]}`;
|
||||
};
|
||||
|
||||
export async function svgStringToFile(
|
||||
svgString: string,
|
||||
fileName: string,
|
||||
): Promise<File> {
|
||||
const blob = new Blob([svgString], { type: "image/svg+xml" });
|
||||
return new File([blob], fileName, { type: "image/svg+xml" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user