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", `
 | 
							elCode({ id, content: code })
 | 
				
			||||||
			Flems(document.getElementById("${id}"), {
 | 
					 | 
				
			||||||
				files: [{
 | 
					 | 
				
			||||||
					name: ".js",
 | 
					 | 
				
			||||||
					content: ${JSON.stringify(code)}
 | 
					 | 
				
			||||||
				}],
 | 
					 | 
				
			||||||
				toolbar: false,
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
		`)
 | 
					 | 
				
			||||||
	);
 | 
						);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					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(){
 | 
					function register(){
 | 
				
			||||||
	if(loaded) return;
 | 
						if(loaded) return;
 | 
				
			||||||
	document.head.append(
 | 
						document.head.append(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user