mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	add some comments
This commit is contained in:
		
							parent
							
								
									025032de42
								
							
						
					
					
						commit
						27d0388d79
					
				@ -176,6 +176,12 @@ async function setContentPane() {
 | 
			
		||||
         * can the revisions called without being on the note type before?
 | 
			
		||||
         * if so: load excalidraw
 | 
			
		||||
         */
 | 
			
		||||
        // FIXME: Does it make sense to use EXCALIDRAW_UTILS  that are 1.5 MB
 | 
			
		||||
        //        whereas excalidraw (650kB) +react(12kB)+reactdom(118kB)
 | 
			
		||||
        /**
 | 
			
		||||
         * FIXME: We load a font called Virgil.wof2, which originates from excalidraw.com
 | 
			
		||||
         *        REMOVE external dependency!!!! This is defined in the svg in defs.style
 | 
			
		||||
         */ 
 | 
			
		||||
        await libraryLoader.requireLibrary(libraryLoader.EXCALIDRAW_UTILS);
 | 
			
		||||
        const {exportToSvg} = window.ExcalidrawUtils
 | 
			
		||||
 | 
			
		||||
@ -192,11 +198,15 @@ async function setContentPane() {
 | 
			
		||||
                files: data.files,
 | 
			
		||||
            }
 | 
			
		||||
            const svg = await exportToSvg(excData);
 | 
			
		||||
            console.log("canvas-note", data, svg);
 | 
			
		||||
            $content.html($("<div>").html(svg));
 | 
			
		||||
            console.log("canvas-note revision", data, svg);
 | 
			
		||||
            $content
 | 
			
		||||
                .html(
 | 
			
		||||
                    $('<div>')
 | 
			
		||||
                    .html(svg)
 | 
			
		||||
                );
 | 
			
		||||
        } catch(err) {
 | 
			
		||||
            console.error("error parsing fullNoteRevision.content as JSON", fullNoteRevision.content, err);
 | 
			
		||||
            $content.html($("<div>").text("error parsing content"));
 | 
			
		||||
            $content.html($("<div>").text("Error parsing content. Please check console.error() for more details."));
 | 
			
		||||
        }        
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user