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>

    building text editor template using html css js

    https://manajmnt-code.blogspot.com/2021/05/building-text-editor-template-using.html
    To build a text editor we need firstly an HTML template like this one

    this template content a buttons, dropdowns, div tag editable.
    the dropdown also content a command buttons to do something like open file, save, copy, paste, insert image...
    to do this, we need: file system accessAPI and clipboard api

    How-to ask user to to verify or accept to remove content of div

    https://manajmnt-code.blogspot.com/2021/04/how-to-ask-user-to-to-verify-or-accept.html
    In this example we learn how to clear div content editable with button after ask user to verify or accept to remove content of div

    simple wysiwyg editor [ source code ]

    https://manajmnt-code.blogspot.com/2021/03/simple-wysiwyg%20editor.html
    This is a WYSIWYG text editor based HTML and JavaScript , we need to create them to execCommand () and div tag with content editable content attribute.