Unfortunately their code editor within the text lessons keeps rejecting the script and deleting it once you switch to HTML editor view. so there is some limitations what type of scripts can be executed.
In our case, we want to mirror the text and video lessons in thinkific courses and use discourse as comment engine.
We are definitely open to host our courses on Discourse directly. But the navigation and checkout are huge benefits that thinkific provides. We run on stable branch, so we have to wait until 3.4 release to utilize thenew Docs view.