It seems that if I tag a shadow tiddler with $:/tags/RawMarkup, it has no effect. Once I edit the tiddler, everything works.
Is there an alternative to having a shadow tiddler’s contents included in ?
I would have thought the act of tagging a shadow tiddler edits it.
I belive You need to save and reload the wiki for it to work.
What I meant is I have a shadow tiddler that has this tag.
If I understand correctly, you have created a plugin that contains a shadow tiddler that is tagged with $:/tags/RawMarkup
, and you are expecting the contents of that tiddler to be invoked at load time.
One thing that may help is to save-and-reload your document TWICE (even without editing that shadow tiddler).
Here’s what SHOULD be happening:
The first time you save-and-reload after importing your plugin, the plugin’s shadow tiddlers are “unpacked” at startup, creating any shadow tiddlers that have been tagged with $:/tags/RawMarkup
.
Then, when you save a second time, the contents of that now existing shadow tiddler should be copied into the <head>
section of the file, which is performed by the following lines that are found in $:/core/templates/tiddlywiki5.html
:
<!--~~ Raw markup ~~-->
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/core/wiki/rawmarkup]] ||$:/core/templates/plain-text-tiddler}}}
{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}
{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified]] ||$:/core/templates/raw-static-tiddler}}}`
When you then reload the now twice saved file, the shadow contents that were copied into the <head>
section are then invoked as you expected, so that whatever raw markup they contain can be processed.
Let me know if this works as I have described.
-e
Works as you described. Thanks!