File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export function writeHtml({
90
90
const topHTML = Math . round ( ( activeLine . y1 - activeLine . maxFontBoundingBoxAscentLine ) * 1000 ) / 1000 ;
91
91
bodyStr += ` <div class="scribe-line" style="left:${ activeLine . left } px;top:${ topHTML } px;">\n` ;
92
92
bodyStr += activeLine . bodyWordsStr ;
93
+ bodyStr += ' <br>\n' ;
93
94
bodyStr += ' </div>\n' ;
94
95
}
95
96
activeLine . bodyWordsStr = '' ;
@@ -128,7 +129,7 @@ export function writeHtml({
128
129
129
130
const imageObj = images ? images [ g ] : null ;
130
131
if ( imageObj ) {
131
- bodyStr += ` <img src="${ imageObj . src } ">\n` ;
132
+ bodyStr += ` <img class="scribe-image" src="${ imageObj . src } ">\n` ;
132
133
}
133
134
134
135
if ( removeMargins ) {
@@ -339,6 +340,12 @@ export function writeHtml({
339
340
styleStr += ' white-space:nowrap;\n' ;
340
341
styleStr += ' }\n' ;
341
342
343
+ styleStr += ' .scribe-image {\n' ;
344
+ styleStr += ' position:absolute;\n' ;
345
+ styleStr += ' user-select:none;\n' ;
346
+ styleStr += ' pointer-events:none;\n' ;
347
+ styleStr += ' }\n' ;
348
+
342
349
for ( const fontI of fontsUsed ) {
343
350
const cdnPath = 'https://cdn.jsdelivr.net/npm/[email protected] /fonts/all/' ;
344
351
let styleTitleCase = fontI . style . charAt ( 0 ) . toUpperCase ( ) + fontI . style . slice ( 1 ) . toLowerCase ( ) ;
You can’t perform that action at this time.
0 commit comments