We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
the same issue to me. but I have reaserched example. this is my solution:
<Md2Poster className="!max-w-none" theme={theme} ref={posterRef} size={sizeType} aspectRatio={ratioType} >
theme :
<option value="SpringGradientWave">SpringGradientWave</option> <option value="blue">blue</option> <option value="pink">pink</option> <option value="purple">purple</option> <option value="green">green</option> <option value="yellow">yellow</option> <option value="gray">gray</option> <option value="red">red</option> <option value="indigo">indigo</option>
download png
const downloadImageFromBlob = (blob, filename) => { const blobUrl = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = blobUrl; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(blobUrl); }; const handleButtonClick = async () => { setLoading(true); try { const blob = await posterRef.current.handleCopy(); downloadImageFromBlob(blob, "output.png"); } catch (error) { console.error("handleCopy 出错:", error); } finally { setLoading(false); } };
more detail see here https://github.com/app-toolkit/m2p/blob/main/src/App.jsx#L63
hope to help you.
Sorry, something went wrong.
No branches or pull requests
This is a good project, Thanks!
The text was updated successfully, but these errors were encountered: