I'm writing a very simple WYSIWYG editor using javascript
When I use the following it adds the link to the div
link.addEventListener("click", function () {
var name = prompt("Enter the text");
var url = prompt("Enter the URL", "http://");
update("insertHTML", "<a href=" + url +">"+name+"</a>");
});
function update(cmd, param){
document.execCommand(cmd, false, param);
}
This works according to inspectElement in Chrome tools, but, I can't click on it.
Is it possible to make this clickable?