Skip to content

Icon to image display failed #149

Open
@green0701

Description

@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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions