Answers for "how to make a code editor in html"

27

online html editor

<!-- Answer to: "online html editor" -->

<!--
  A common good "online editor" would be:
  https://jsfiddle.net/

  However, for an online editor focusing specifically on html
  this one is pretty good:
  https://html-online.com/editor/
-->
Posted by: Guest on March-01-2020
1

how to make a text editor in html

function chooseColor(){
      var mycolor = document.getElementById("myColor").value;
      document.execCommand('foreColor', false, mycolor);
    }

    function changeFont(){
      var myFont = document.getElementById("input-font").value;
      document.execCommand('fontName', false, myFont);
    }

    function changeSize(){
      var mysize = document.getElementById("fontSize").value;
      document.execCommand('fontSize', false, mysize);
    }

    function checkDiv(){
      var editorText = document.getElementById("editor1").innerHTML;
      if(editorText === ''){
        document.getElementById("editor1").style.border = '5px solid red';
      }
    }

    function removeBorder(){
      document.getElementById("editor1").style.border = '1px solid transparent';
    }
Posted by: Guest on March-02-2020
1

html online editor

// Use the w3schools tryit editor
//for example below address
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_default
Posted by: Guest on February-04-2021

Code answers related to "how to make a code editor in html"

Code answers related to "Swift"

Browse Popular Code Answers by Language