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';
}
Also in HTML:
- how to change font in html
- ionic textarea
- html ul types
- html input default value
- sort by value map
- how to insert degree symbol in html
- what is semantic html
- html doctype
- how to add border to a text in html with javascript
- howto include the single quotes in html
- table bootstrap with scrool
- excel vba largest value for Decimal data type
- how to put an image in html
- change font in html
- change header color html
- afjsi sein
- hashtag in html
- bootstrap 3 table
- empecher saut de ligne html
- html to json
- hyperlink html
- Sending HTML Code Through JSON
- html input box integer only
- how to include jquery in html