{"action":"created","issue":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2159","labels_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2159/labels{/name}","comments_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2159/comments","events_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2159/events","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/2159","id":123993219,"number":2159,"title":"Plugins that write text into the head section need two reloads to be installed (browser only)","user":{"login":"buggyj","id":2855795,"avatar_url":"https://avatars.githubusercontent.com/u/2855795?v=3","gravatar_id":"","url":"https://api.github.com/users/buggyj","html_url":"https://github.com/buggyj","followers_url":"https://api.github.com/users/buggyj/followers","following_url":"https://api.github.com/users/buggyj/following{/other_user}","gists_url":"https://api.github.com/users/buggyj/gists{/gist_id}","starred_url":"https://api.github.com/users/buggyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buggyj/subscriptions","organizations_url":"https://api.github.com/users/buggyj/orgs","repos_url":"https://api.github.com/users/buggyj/repos","events_url":"https://api.github.com/users/buggyj/events{/privacy}","received_events_url":"https://api.github.com/users/buggyj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-27T19:23:12Z","updated_at":"2015-12-28T14:36:34Z","closed_at":null,"body":"This is a problem when using $:/tags/RawMarkup in a plugin.\r\n - this tag is used to insert a tiddlers text in the the head area of the html of the tiddlywiki - this happen when the tiddlywiki is saved. But when a plugin is first dropped into a tiddlywiki, its plugin tiddlers are not unpacked, so they will not be available to be inserted into the head. A reload is necessary to unpacked tiddlers from the plugins. This means this type of plugin will need to be saved and reloaded twice before it will work.\r\n"},"comment":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/comments/167581554","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/2159#issuecomment-167581554","issue_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2159","id":167581554,"user":{"login":"buggyj","id":2855795,"avatar_url":"https://avatars.githubusercontent.com/u/2855795?v=3","gravatar_id":"","url":"https://api.github.com/users/buggyj","html_url":"https://github.com/buggyj","followers_url":"https://api.github.com/users/buggyj/followers","following_url":"https://api.github.com/users/buggyj/following{/other_user}","gists_url":"https://api.github.com/users/buggyj/gists{/gist_id}","starred_url":"https://api.github.com/users/buggyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buggyj/subscriptions","organizations_url":"https://api.github.com/users/buggyj/orgs","repos_url":"https://api.github.com/users/buggyj/repos","events_url":"https://api.github.com/users/buggyj/events{/privacy}","received_events_url":"https://api.github.com/users/buggyj/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T14:36:34Z","updated_at":"2015-12-28T14:36:34Z","body":"My proposed solution is to access tiddlers tagged as  $:/tags/RawMarkup from plugin tiddlers, thus even if the plugin in newly added and so has not been unplacked, these tiddlers can still be added to the head area of the tiddlywiki's html as it is saved.\r\n\r\nIn order to do this I propose extending the filter mechanism to use plugin tiddlers as a source (in place of the store) in filters, and thus leveraging the existing filter mechanism. The format could  be:\r\n\r\n`[plugin[$:/plugin/anauthor/plugin]....rest of filter....`\r\n\r\nWith this tool the 'saving' templates can be modified to include tiddlers that go into the html head area.\r\n"}}