mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-23 01:10:10 +02:00
feat: support creating text containers programatically
This commit is contained in:
@@ -344,7 +344,23 @@ const ExcalidrawWrapper = () => {
|
||||
|
||||
initializeScene({ collabAPI, excalidrawAPI }).then(async (data) => {
|
||||
loadImages(data, /* isInitialLoad */ true);
|
||||
initialStatePromiseRef.current.promise.resolve(data.scene);
|
||||
initialStatePromiseRef.current.promise.resolve({
|
||||
type: "excalidraw",
|
||||
version: 2,
|
||||
source: "http://localhost:3000",
|
||||
elements: [
|
||||
//@ts-ignore
|
||||
{
|
||||
type: "rectangle",
|
||||
children: [{ text: "HELLO DAMMMMY" }],
|
||||
},
|
||||
],
|
||||
appState: {
|
||||
gridSize: null,
|
||||
viewBackgroundColor: "#ffffff",
|
||||
},
|
||||
files: {},
|
||||
});
|
||||
});
|
||||
|
||||
const onHashChange = async (event: HashChangeEvent) => {
|
||||
|
Reference in New Issue
Block a user