Vanessa 2025-09-13 08:59:41 +08:00
parent 5797872b97
commit 2ff8c148bd
2 changed files with 7 additions and 0 deletions

View file

@ -608,6 +608,10 @@
pointer-events: none;
display: block;
&:not(:empty)::before {
content: "";
}
&::before {
counter-increment: linenumber;
content: counter(linenumber);

View file

@ -80,6 +80,9 @@ export const exportImage = (id: string) => {
objectElement.remove();
}
}
previewElement.querySelectorAll(".protyle-linenumber__rows span").forEach((item, index) => {
item.textContent = (index + 1).toString();
});
setTimeout(() => {
addScript("/stage/protyle/js/html-to-image.min.js?v=1.11.13", "protyleHtml2image").then(async () => {
let blob = await window.htmlToImage.toBlob(exportDialog.element.querySelector(".b3-dialog__content"));