JSFiddle - React, Tailwind, and code Playground

HTML

<div data-bind="html: dynamicHtml, afterHtmlRender: customCode"></div>

JavaScript

ko.bindingHandlers.afterHtmlRender = {
    update: function(el, va, ab){
        ab().html && va()(ab().html());
    }
}

function Model(){
    this.dynamicHtml = ko.observable('<b>Hello!</b>');
    this.customCode = function(value){ alert('changed!\n\n' + value); };
}

ko.applyBindings(new Model);