You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to re-rendering the <pre> in the JS click event. The core logic is to update the content of <pre>, and call pseudocode.renderElement again. But re-rendering fails and it still shows the content before updating.
The renderElement function replaces the <pre> element with a new element that contains the rendered output. The rendered output is not simply inserted inside the <pre> element. See:
One approach to achieve what you're trying here is to use renderToString# instead. In that case, your #output element could just be a div and you could insert the rendered HTML into it. Something like:
I would like to re-rendering the
<pre>
in the JS click event. The core logic is to update the content of<pre>
, and callpseudocode.renderElement
again. But re-rendering fails and it still shows the content before updating.The text was updated successfully, but these errors were encountered: