Per tiddler type preview

For determining whether to show the preview pane there are two configurations: global or per tiddler. I’d like to know if it is possible to have a per tiddler type state? For example, when writing a javascript tiddler I don’t need a preview, so I’d like all javascript tiddlers to not have previews but other tiddlers to have.

I know I can rewrite the core tiddler that has this logic ( $:/core/ui/EditTemplate/body/default) but I’m wondering if it is possible to do it externally to the core plugin. Maybe catch navigation events to just-in-time write the global state tiddler?

Theoretically, we could introduce a cascade that is run to determine if a specific tiddler should show a preview. The default cascade entries would implement the current logic, and users would be able to insert their own cascade rules.

In the meantime, you might prefer to set up an edit template variant to apply to the javascript tiddlers, using the edit template cascade:

$:/tags/EditTemplateBodyFilter

A custom edit template can bypass the preview-pane element altogether. And if there are other preferences that track javascript-tiddler editing, you can fold those in as well.