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
Go to settings -> editing and enable "Show previews without reloading the page"
Edit a page with scratchblocks
Hit "Show Preview"
Change the content blocks
Hit "Show Preview" a second time
Notice that the blocks did not render
Solution:
Trigger a render when live previews are generated. A hacky solution would be to just add an event listener to the "Show Preview" button, but a better solution would be to see if there are any JS events fired or something. MW documentation seems to indicate there is a "wikipage.content" hook we can use.
It appears we do properly use the hook and the function is running. Adding a delay (via setTimeout) seems to make it load properly, so maybe we're somehow triggering too early?
Steps to reproduce:
Solution:
Trigger a render when live previews are generated. A hacky solution would be to just add an event listener to the "Show Preview" button, but a better solution would be to see if there are any JS events fired or something. MW documentation seems to indicate there is a "wikipage.content" hook we can use.
Example code from MW for the hook is:
The text was updated successfully, but these errors were encountered: