JSFiddle - React, Tailwind, and code Playground

by Afzaal Ahmad Zeeshan

HTML

<p id="paragraph"></p>

<button id="decode">HTML content</button>
<button id="encode">HTML encoded HTML</button>

JavaScript

$('#decode').click(function () {
    $('#paragraph').append('<input type="text" />');
});

$('#encode').click(function () {
    $('#paragraph').append('&lt;input type="text" /&gt;');
});