-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update rendering dynamically (on button click) #46
Comments
Hi, Sorry about the delayed response. The Line 64 in 1ab6334
One approach to achieve what you're trying here is to use const textInput = document.getElementById("input");
const output = document.getElementById("output");
const updateButton = document.getElementById("generate");
updateButton.addEventListener("click", () => {
output.innerHTML = pseudocode.renderToString(textInput.value);
}); I tried it out at on https://jsfiddle.net/f7hme2dz/. # I will mark this issue as resolved and pin it. Please feel free to reopen if you face any further issues. |
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: