mirror of
				https://github.com/DerTyp7/explainegy-nextjs.git
				synced 2025-10-31 13:47:11 +01:00 
			
		
		
		
	added richtig viel sachen
This commit is contained in:
		
							
								
								
									
										19
									
								
								app/tutorials/[tutorialId]/LoadPrism.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								app/tutorials/[tutorialId]/LoadPrism.tsx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| "use client"; | ||||
| import React from "react"; | ||||
| import { useEffect } from "react"; | ||||
|  | ||||
| import Prism from "prismjs"; | ||||
| import "../../../styles/prism_themes/prism-one-dark.css"; | ||||
| //import "../../../styles/prism_themes/prism-one-light.css"; | ||||
|  | ||||
| export default function LoadPrism() { | ||||
| 	useEffect(() => { | ||||
| 		document.querySelectorAll("pre").forEach((pre) => { | ||||
| 			if (pre.classList.length < 1) { | ||||
| 				pre.classList.add("language-"); | ||||
| 			} | ||||
| 		}); | ||||
| 		Prism.highlightAll(); | ||||
| 	}, []); | ||||
| 	return <div></div>; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Janis
					Janis