File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export const exportImage = (id: string) => {
9090 item . textContent = ( index + 1 ) . toString ( ) ;
9191 } ) ;
9292 setTimeout ( ( ) => {
93- addScript ( " ${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13" , "protyleHtml2image" ) . then ( async ( ) => {
93+ addScript ( ` ${ Constants . PROTYLE_CDN } /js/html-to-image.min.js?v=1.11.13` , "protyleHtml2image" ) . then ( async ( ) => {
9494 let blob = await window . htmlToImage . toBlob ( exportDialog . element . querySelector ( ".b3-dialog__content" ) ) ;
9595 if ( isIPhone ( ) || isSafari ( ) ) {
9696 await window . htmlToImage . toBlob ( contentElement ) ;
@@ -138,7 +138,7 @@ export const exportImage = (id: string) => {
138138 if ( window . siyuan . config . export . imageWatermarkStr . startsWith ( "http" ) ) {
139139 watermarkPreviewElement . setAttribute ( "style" , `background-image: url(${ window . siyuan . config . export . imageWatermarkStr } );background-repeat: repeat;position: absolute;top: 0;left: 0;width: 100%;height: 100%;border-radius: var(--b3-border-radius-b);` ) ;
140140 } else {
141- addScript ( " ${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13" , "protyleHtml2image" ) . then ( ( ) => {
141+ addScript ( ` ${ Constants . PROTYLE_CDN } /js/html-to-image.min.js?v=1.11.13` , "protyleHtml2image" ) . then ( ( ) => {
142142 const width = Math . max ( exportDialog . element . querySelector ( ".export-img" ) . clientWidth / 3 , 150 ) ;
143143 watermarkPreviewElement . setAttribute ( "style" , `width: ${ width } px;height: ${ width } px;display: flex;justify-content: center;align-items: center;color: var(--b3-border-color);font-size: 14px;` ) ;
144144 watermarkPreviewElement . innerHTML = `<div style="transform: rotate(-45deg)">${ window . siyuan . config . export . imageWatermarkStr } </div>` ;
Original file line number Diff line number Diff line change @@ -1061,7 +1061,7 @@ export class Toolbar {
10611061 return ;
10621062 }
10631063 setTimeout ( ( ) => {
1064- addScript ( " ${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13" , "protyleHtml2image" ) . then ( ( ) => {
1064+ addScript ( ` ${ Constants . PROTYLE_CDN } /js/html-to-image.min.js?v=1.11.13` , "protyleHtml2image" ) . then ( ( ) => {
10651065 ( renderElement as HTMLHtmlElement ) . style . display = "inline-block" ;
10661066 window . htmlToImage . toBlob ( renderElement ) . then ( blob => {
10671067 ( renderElement as HTMLHtmlElement ) . style . display = "" ;
You can’t perform that action at this time.
0 commit comments