I can reproduce this with this simple theme component:
<script type="text/discourse-plugin" version="0.8">
api.decorateCooked($elem => {
if ($elem.get(0).className == 'd-editor-preview') {
const $paragraphs = $elem.children('p');
$.each($paragraphs, (paragraphIndex, paragraph) => {
paragraph.remove();
});
}
});
</script>
- Create a new topic
- Start typing. The error appears in the dev console for the second character that is typed.