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
Hello, I am using prism live in a textarea and it works fine but when I try to add a code snippet using a button onclick function (document.getElementById("content").innerHTML += header;), the code is added but invisible until i press spacebar or another key, then it shows up nicely highlighted as expected. Is there a way to force it so it is highlighted right away?
It works when I just paste it with ctrl-v but not with button onclick.
thanks
The text was updated successfully, but these errors were encountered:
hermanvl
changed the title
Adding a code snippet with javascript function does not highlight code but after click
Adding a code snippet with javascript function does not highlight code but after press spacebar or other key
May 27, 2021
Hello, I am using prism live in a textarea and it works fine but when I try to add a code snippet using a button onclick function (document.getElementById("content").innerHTML += header;), the code is added but invisible until i press spacebar or another key, then it shows up nicely highlighted as expected. Is there a way to force it so it is highlighted right away?
It works when I just paste it with ctrl-v but not with button onclick.
thanks
The text was updated successfully, but these errors were encountered: