mirror of
				https://github.com/jaandrle/deka-dom-el
				synced 2025-11-03 22:59:16 +01:00 
			
		
		
		
	elCode
				
					
				
			This commit is contained in:
		@@ -24,17 +24,16 @@ export function example({ src, language= "javascript" }){
 | 
			
		||||
				})
 | 
			
		||||
			)
 | 
			
		||||
		),
 | 
			
		||||
		el("script", `
 | 
			
		||||
			Flems(document.getElementById("${id}"), {
 | 
			
		||||
				files: [{
 | 
			
		||||
					name: ".js",
 | 
			
		||||
					content: ${JSON.stringify(code)}
 | 
			
		||||
				}],
 | 
			
		||||
				toolbar: false,
 | 
			
		||||
			})
 | 
			
		||||
		`)
 | 
			
		||||
		elCode({ id, content: code })
 | 
			
		||||
	);
 | 
			
		||||
}
 | 
			
		||||
function elCode({ id, content }){
 | 
			
		||||
	const options= JSON.stringify({
 | 
			
		||||
		files: [{ name: ".js", content }],
 | 
			
		||||
		toolbar: false
 | 
			
		||||
	});
 | 
			
		||||
	return el("script", `Flems(document.getElementById("${id}"), JSON.parse(${options}));`);
 | 
			
		||||
}
 | 
			
		||||
function register(){
 | 
			
		||||
	if(loaded) return;
 | 
			
		||||
	document.head.append(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user