I wanted to add a html div after paragraph on clicking the paragraph, but the after method is not taking the parameter as HTML string, rather it is taking it as normal text.
so on clicking I am getting:
This is a paragraph.
<div>sdfds</div>
rather than:
This is a paragraph.
sdfds
This is the function I am using:
function abc(e) {
e.target.after("<div>sdfds</div>");
}
I am calling this function by:
<p onClick=abc(event)>This is a paragraph.</p>