Your code is working for me in Chrome. I copied your tiddler text into a
new tiddler in editions/tw5.com/tiddlers, and then rebuilt index.html. On
opening it in the browser, I saw:

jscolor.js invoked $:/plugins/skeeve/jscolor.js:15
Leaving jscolor.js $:/plugins/skeeve/jscolor.js:21
EditTextWidget PostRender Called

The final message was because of rendering the search box in the sidebar.
If I then open the control panel I see:


$:/core/modules/utils/logger.js:30
5EditTextWidget PostRender Called

There's one postrender for each edit-text widget in the basic tab of the
control panel.

If I flick a tiddler into edit mode and add a field I see a number of
further notifications.

Best wishes

Jeremy






On Wed, Apr 9, 2014 at 11:09 AM, Stephan Hradek <[email protected]>wrote:

> I tried to get it to work, but I seem to fail.
>
> This is a minimal widget I wrote for testing:
>
> /*\
> title: $:/plugins/skeeve/jscolor.js
> type: application/javascript
> module-type: widget
> \*/
> (function(){
>
> /*jslint node: true, browser: true */
> /*global $tw: false */
> "use strict";
>
> var EditTextWidget =
> require("$:/core/modules/widgets/edit-text.js")["edit-text"];
>
> console.log("jscolor.js invoked");
>
> EditTextWidget.prototype.postRender = function() {
>     console.log("EditTextWidget PostRender Called");
> };
>
> console.log("Leaving jscolor.js");
>
> })();
>
> I see the "jscolor.js invoked" and the "Leaving jscolor.js" messages in
> the console, but I'd expect the "EditTextWidget PostRender Called" for
> every field editor to appear, but nothing happens.
>
> Does someone spot any mistake I made?
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to