Hi,

I am trying to integrate reveal.js [1] in a convenient way, such that I can 
use TiddlyWiki to edit and store the presentation slides, but then simply 
launch it straight from the wiki. Aditionally I am considering an export 
mode as well, for creating standalone versions.

While I still have various challenges to solve, I am currently stumped 
trying to open a new window with the reveal.js library loaded together with 
the slides. My idea was to use the existing `tm-open-window` message and a 
custom template. However I am having trouble finding out how I could take 
full control of the document being displayed in the new window.

While reading through `$:/core/modules/startup/windows.js` I am getting the 
impression there is no way to actually just dump a template similar to 
`$:/core/save/all` (which allows manipulating the entire document including 
headers etc) into a new window. Am I missing something here?

Can anyone suggest a method I could use? I would like to use a template 
tiddler which contains the entire document ( i.e. `<html><head>custom 
headers...</head><body>slide tiddlers rendered through another 
template...</body></html>`)

My current attempts have thus far only produced nested 
`<html>...<body><html>..</html></body></html>` type documents which do not 
display properly, for obvious reasons.

Since I was stumped using the existing `tm-open-window` message, I tried 
writing a new message `tm-open-raw-window` similar to the original, but 
without the surrounding document. However I was not able to find out how to 
parse a template-tiddler to html to dump it into the window. 
`$tw.wiki.renderTiddler("text/html",'templatename')` looked rather 
promising, but raised an exception for my template:

```
$:/core/modules/utils/utils.js:548 Uncaught TypeError: Cannot read property 
'length' of undefined
    at Object.exports.parseTextReference
($:/core/modules/utils/utils.js:548:45)
    at exports.list ($:/core/modules/filters/list.js:21:18)
    at eval ($:/core/modules/filters.js:207:15)
    at Object.$tw.utils.each

...
```

Making a wild guess here, judging by the call stack, it might have 
something to do with the list widget in the template? Maybe missing the 
reference to the `currentTiddler` containing the `list` field?

Part of the template:
```
<$list filter="[list{!!title}]" emptyMessage="No slides added yet" 
template="$:/core/ui/ListItemTemplate"/>
```

So if anyone can tell me how to do this, this might also solve my problem. 
:)

Cheers.

[1] https://github.com/hakimel/reveal.js

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/f085efaf-7beb-4960-bcc6-b147dfba8a16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to