When designing complex TiddlyWiki script it is useful to have the preview output window open to see the result.
There are a small subset of things that the editor can do that will cause loops and even crashes. Knowing when to stop the preview so this does not hapen is subtle and you need to be ever viligent to avoid this.
I am wondering if some of our core developers, or Javascript gurues think of a way to “sand box” the preview window in a way that it times out or displayes an error message if a problem seems to exist as it attempts to render the preview.
- This would allow us to edit and preview the output without fear of either loosing our latest changes or the wiki itself, and the hastle of recovering.
- One could apply this to rendering all tiddlers but just focusing on the preview would mean any performace hit may be acceptable. This could be set to only happen on the current tiddler when using $:/config/ShowEditPreview/PerTiddler = yes
I am confident this is possible but it may be hard to find how to do it, but it could be a powerful feature for anyone writting javascript code, not just in tiddlywiki.
Post script:
- Perhaps the first render after saving a tiddler could allso use the sand box?