tldraw
Version:
A tiny little drawing editor.
17 lines (16 loc) • 433 B
JavaScript
import { useEditor } from "@tldraw/editor";
function useGetEmbedShapeUtil() {
const editor = useEditor();
return editor.getShapeUtil("embed");
}
function useGetEmbedDefinition() {
const embedUtil = useGetEmbedShapeUtil();
return (url) => {
return embedUtil ? embedUtil.getEmbedDefinition(url) : void 0;
};
}
export {
useGetEmbedDefinition,
useGetEmbedShapeUtil
};
//# sourceMappingURL=useGetEmbedDefinition.mjs.map