Si,

I have always felt the color picker falls short, though it seems to be a 
HTML default. My research suggests it already users color names in the 
pallet.

   - I would like to be able to search for color names in the picker
   - or past a color number into the picker I extract from anywhere with an 
   in browser color picker
   - I have a collection of hundreds of color name/numbers which I would 
   add to this selection


The custom formatting or editing of standard fields is handled inside 
javascript as far as I can see. I have found that the following allows you 
to edit the color field as text.

<$edit-text tiddler=<<currentTiddler>> field=color  type="text" 
tag="input"/>

Placing the above in a tiddler tagged  $:/tags/EditTemplate will allow you 
to edit it as text and use you color names in the editTemplate
Or better use;

<$list filter="[all[current]has:field[color]]" variable=nul>
Color: <$edit-text tiddler=<<currentTiddler>> field=color  type="text" 
tag="input"/>
</$list>

Of course you could replace or add a this with a select to select from the 
valid color names as well. See in $:/core/macros/colour-picker for a list 
of color names.

There is room for more research but is this enough for now?

Tones


On Sunday, 25 July 2021 at 04:48:25 UTC+10 Si wrote:

> Thanks Tones, if you have solution hidden away somewhere that would be 
> great!
>
> I know that I can add extra ways to view/edit the field, but I want to 
> actually replace the existing mechanism for editing the "color" field.
>
>
> On Saturday, 24 July 2021 at 14:31:37 UTC+1 TW Tones wrote:
>
>> Si,
>>
>> I can have a look tomorrow, I have delved into this before, however just 
>> using your own view widget or edit-text widget will let you access the true 
>> value.
>>
>> Of course also {{!!color}} to view.
>>
>> You could write an edit template tiddler tagged $:/tags/EditTemplate that 
>> provides this text rather than stylised edit in edit mode.
>>
>> if has:field[color] then use edit-text widget.
>>
>> Regards
>> Tones
>>
>>
>>
>>
>> On Saturday, 24 July 2021 at 01:26:47 UTC+10 Si wrote:
>>
>>> If you add the field "color" TiddlyWiki will replace the text-box for 
>>> editing the field value with a color-picker.
>>>
>>> In most cases this is very helpful, but I prefer to use color names 
>>> (e.g. papayawhip), so I don't want to see the color-picker.
>>>
>>> I can't figure out how to remove this feature, can anyone help me out?
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a3abc023-a6e0-4b98-8d84-c4123334670dn%40googlegroups.com.

Reply via email to