Hi,
I'm trying to integrate reveal into TW5, however the wrapper fails to load
the the library.
Error executing boot module $:/plugins/datenberg/reveal/wrapper.js: Cannot
> find module named '$:/plugins/datenberg/reveal/reveal.min.js' required by
> module '$:/plugins/datenberg/reveal/wrapper.js', resolved to
> $:/plugins/datenberg/reveal/reveal.min.js
>
I'm trying to integrate reveal into TW5, however the wrapper fails to load
the the library.
<div author="Amna Funk" core-version=">=5.0.0"
> created="20141001090035140" dependents="" description="asdf" list=""
> modified="20141001093019566" plugin-type="plugin" tags="coding"
> title="$:/plugins/datenberg/reveal" type="application/json" version="0.0.1">
> <pre>{
> "tiddlers": {
> "$:/plugins/datenberg/reveal/reveal.min.js":{},
> "$:/plugins/datenberg/reveal/wrapper.js":{}
> }
> }</pre>
> </div>
>
I created two empty shadow tiddlers (probably not necessary) and filled
them with code.
I then created real tiddlers, the wrapper widget based on katex. It's just
trying to load the reveal.min.js ($:/plugins/datenberg/reveal/reveal.min.js
exitsts and contains the javascript lib) type for both is
application/javascript.
/*\
> title: $:/plugins/datenberg/reveal/wrapper.js
> type: application/javascript
> module-type: widget
>
> Wrapper for `reveal.min.js` that provides a reveal widget. It is also
> available under the alias `<$reveal>`
>
> \*/
> (function(){
>
> /*jslint node: true, browser: true */
> /*global $tw: false */
> "use strict";
>
> var reveal = require("$:/plugins/datenberg/reveal/reveal.min.js"),
> Widget = require("$:/core/modules/widgets/widget.js").widget;
>
> var revealWidget = function(parseTreeNode,options) {
> this.initialise(parseTreeNode,options);
> };
>
> /*
> Inherit from the base widget class
> */
> revealWidget.prototype = new Widget();
>
> /*
> Render this widget into the DOM
> */
> revealWidget.prototype.render = function(parent,nextSibling) {
> // Housekeeping
> this.parentDomNode = parent;
> this.computeAttributes();
> this.execute();
> // Get the source text
> var text = this.getAttribute("text",this.parseTreeNode.text || "");
> // Render it into a span
> var span = this.document.createElement("span");
>
> span.textContent = "Hello Reveal";
>
> // Insert it into the DOM
> parent.insertBefore(span,nextSibling);
> this.domNodes.push(span);
> };
>
> /*
> Compute the internal state of the widget
> */
> revealWidget.prototype.execute = function() {
> // Nothing to do for a reveal widget
> };
>
> /*
> Selectively refreshes the widget if needed. Returns true if the widget or
> any of its children needed re-rendering
> */
> revealWidget.prototype.refresh = function(changedTiddlers) {
> var changedAttributes = this.computeAttributes();
> if(changedAttributes.text) {
> this.refreshSelf();
> return true;
> } else {
> return false;
> }
> };
>
> exports.reveal = revealWidget;
>
>
> })();
>
>
Where's the problem?
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.