Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Jeremy Ruston
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

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Stephan Hradek
Tested with a fresh download and it works as expected. It did not work with the node.js version. I'm going to update that and test again. -- You received this message because you are subscribed to the Google Groups TiddlyWikiDev group. To unsubscribe from this group and stop receiving emails

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Stephan Hradek
Updated to 5.0.9prerelease and No! No EditTextWidget PostRender Called message at all :( -- 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

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Jeremy Ruston
Updated to 5.0.9prerelease and No! No EditTextWidget PostRender Called message at all :( I ran my experiments against 5.0.9, too. Weird. Best wishes Jeremy On Wed, Apr 9, 2014 at 1:11 PM, Stephan Hradek stephan.hra...@gmail.comwrote: Updated to 5.0.9prerelease and No! No EditTextWidget

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Stephan Hradek
So I've managed to get jscolor to display the picker for the color fields now. The disadvantage is: The changes are not reflected in TW as jscolor is (of course) overwriting the focus and input events and I'm not understanding how I could solve that issue properly :( -- You received this

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Stephan Hradek
I tried to call handleInputEvent alas I have no idea how to get it. I tried this: jscolor.color( domNode, { hash : true, onImmediateChange : EditTextWidget.prototype.handleInputEvent } ); But this gives me JavaScript errors. I gues I need to get the handler somehow from my domNodeā€¦

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Jeremy Ruston
Hi Stephan You'd have to pass a reference to the implementation of handleInputEvent. Something like this: var self = this; ... jscolor.color( domNode, { hash : true, onImmediateChange : self.handleInputEvent } ); Best wishes Jeremy On Wed, Apr 9, 2014 at 3:42 PM, Stephan Hradek

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Jeremy Ruston
Hi Stephan I don't get it :( the handleInputEvent is attached to the domNode, right? So this is what I *thought* should work: No, the handleInputEvent is a method on the edit-text widget. EditTextWidget.prototype.postRender = function() { var domNode = this.domNodes[0];

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-09 Thread Stephan Hradek
I think I have it: EditTextWidget.prototype.postRender = function() { var domNode = this.domNodes[0]; var self = this; if($tw.browser this.document !== $tw.fakeDocument domNode.getAttribute(type) === color) { jscolor.color( domNode, { hash : true, onImmediateChange :

[twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-07 Thread Stephan Hradek
The nightly FF won't run on my old OS X :( -- 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 tiddlywikidev+unsubscr...@googlegroups.com. To post to this group,

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-07 Thread Stephan Hradek
Am Montag, 7. April 2014 18:53:22 UTC+2 schrieb Jeremy Ruston: Hi Stephan The edit-text widget has a postRender method that is called immediately after the DOM nodes for the text input have been created. So if you subclass it you can define that method and have it call jscolor to

Re: [twdev] Re: [TW5] Is anyone able to turn jscolor into a plugin?

2014-04-07 Thread Jeremy Ruston
Both sounds promising. Could you give me links to github where I could find the relevant stuff? Sure. The edit-text widget is here (highlighted on the line that invokes postRender): https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/widgets/edit-text.js#L66 You'll find