How to create html source code with syntax highlighting [no library]
https://manajmnt-code.blogspot.com/2021/05/how-to-create-html-code-editor-with.html
In this code i will be share with you how to create html code editor with:
syntax hightligh;
button to run code in iframe;
button to copy to clipbord
you don't need library or any external source, just with Javascript
Exemple
<style>
.code-str { color:#0000ee ;background:white }
</style>
<!--comment-->
<h2>header </h2>
<script>
function syntaxHighlights() {
/* Create a string object variable */
var name = 'Adam';
</script>
<h2 id="h21" class="code-str" >Welcome Visitor</h2>
<p>When in Rome, do as the Romans do.</p>