How to create html source code with syntax highlighting [no library]

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>
    How to create html source code with syntax highlighting [no library]

    © Manajmnt code

    Share to :

    Comments