Skip to content
New issue

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

Icon to image display failed #149

Open
green0701 opened this issue Aug 1, 2023 · 1 comment
Open

Icon to image display failed #149

green0701 opened this issue Aug 1, 2023 · 1 comment

Comments

@green0701
Copy link

green0701 commented Aug 1, 2023

@font-face {
font-family: "myDocumentEditor"; /* Project id 3353833 */
src: url('iconfont.woff2?t=1650769832866') format('woff2'),
url('iconfont.woff?t=1650769832866') format('woff'),
url('iconfont.ttf?t=1650769832866') format('truetype');
}

.dcs-font {
font-family: "myDocumentEditor" !important;
font-size: 16px;
font-style: normal;
}
.tempICON::before
{
content: "\e964";
font-family: "myDocumentEditor" !important;
}
In html:

javascript:
domtoimage
.toPng(document.getElementsByClassName("tempICON")[0])
.then(function (dataUrl) {
var img = new Image();
img.src = dataUrl;
document.body.appendChild(img);
})
.catch(function (error) {
console.error('oops, something went wrong!', error);
});

image

@AndySpider
Copy link

Same issue here, any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants