I need the code to work as an onclick event that should open the textEditor kind of like the JS button. Is it possible to do so? :target is not getting the work done.
<!DOCTYPE html>
<html>
<body>
<style>
#textEditor {
display: none;
}
#textEditor:target {
border: 1px dashed black;
width: 1350px;
height: 600px;
display: block;
}
</style>
<a href= "#textEditor">Add Notes</a>
<div id= "textEditor" contenteditable="true"></div>
</body>
</html>
#textEditor {
display: none;
}
#textEditor:target {
border: 1px dashed black;
width: 1350px;
height: 600px;
display: block;
}
<a href="#textEditor">Add Notes</a>
<div id="textEditor" contenteditable="true"></div>