Josua,

Thank you, this is what I was looking for not sure how far I can go from 
here, I have a way to mange and define fields with wikitext, macros and 
widgets so this may be best avoided, but it would be interesting to see if 
this could be made more hackable. I would need more guidance if I was to 
try my own startup module. Is there a way for us to have a template we can 
clone and edit for additional fields?, I am not sure then how to save it 
into a wiki, for load time.

Perhaps there is an argument that we have view and edit of system fields 
available on more fields.

My current method invokes a field macro `<<field fieldname>>` and what is 
displayed depends on a wiki or tiddler mode override eg display the field 
in View or Edit modes.

It sheds light on some of the behaviours we get, 

   - I did not realise list and tags were in this. 
   - I see that color is basically using the  editTag: "input", editType: 
   "color", I was hoping to modify this to allow pasting colour numbers into 
   the colour dialogue
   - This suggests to me it would be easy to define fields using other 
   input/edit types available in html like date selectors, email address, 
   numbers etc...
   - `{{!!color}}` returns the content only

Very interesting;

Regards
Tony

On Wednesday, May 20, 2020 at 10:17:57 AM UTC+10, Joshua Fontany wrote:
>
> Hi Tony,
>
> What you are looking for is declared in `boot.js`before the wiki is 
> actually started, from line 994:
>
> ```
> /*
> Register and install the built in tiddler field modules
> */
> $tw.modules.define("$:/boot/tiddlerfields/modified","tiddlerfield",{
> name: "modified",
> parse: $tw.utils.parseDate,
> stringify: $tw.utils.stringifyDate
> });
> $tw.modules.define("$:/boot/tiddlerfields/created","tiddlerfield",{
> name: "created",
> parse: $tw.utils.parseDate,
> stringify: $tw.utils.stringifyDate
> });
> $tw.modules.define("$:/boot/tiddlerfields/color","tiddlerfield",{
> name: "color",
> editTag: "input",
> editType: "color"
> });
> $tw.modules.define("$:/boot/tiddlerfields/tags","tiddlerfield",{
> name: "tags",
> parse: $tw.utils.parseStringArray,
> stringify: $tw.utils.stringifyList
> });
> $tw.modules.define("$:/boot/tiddlerfields/list","tiddlerfield",{
> name: "list",
> parse: $tw.utils.parseStringArray,
> stringify: $tw.utils.stringifyList
> });
> ```
>
> I think this is worth exploring, but will have to think on it. You should 
> be able to setup a startup module to define other parse/stringify 
> definitions.
>
> Best,
> Joshua Fontany
>
> On Tuesday, May 19, 2020 at 6:40:43 AM UTC-7, TonyM wrote:
>>
>> Folks,
>>
>> You may be aware if you transclude a few of the standard fields like
>> {{!!created}}
>> {{!!modified}}
>>
>> What is returned is not the ugly date serial numbers, but
>>
>> Tue May 19 2020 23:34:40 GMT+1000 (Australian Eastern Standard Time)
>>
>> Tue May 19 2020 23:35:52 GMT+1000 (Australian Eastern Standard Time)
>>
>>
>> I believe this is a core mechanism, but since I am 90% of the way into 
>> building a tool to build field definitions I thought it important to ask if 
>> anyone knows how this is done?
>>
>>
>> I would like to know if I can hack this for other fields or possibly 
>> request a change to be able to do so. 
>>
>>
>> I have searched for it but do not know how to find it, since it uses a 
>> basic transclusion method, yet treats these fields differently.
>>
>>
>> Thank in advance for any insight.
>>
>> TonyM
>>
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/844136ec-2676-46bb-93f2-c14ce0d06bfe%40googlegroups.com.

Reply via email to