<!-- api button -->
<button onclick="insertHtml(event);">Insert HTML</button>
<!-- element -->
<textarea id="entry"></textarea>
<!-- call -->
<script>
var app = RedactorX('#entry');
function insertHtml(e) {
e.preventDefault();
e.stopPropagation();
app.editor.insertContent({ html: '<p>Hello world</p>' });
}
</script>