Need help with changing how fields display in editTemplate?

So in the past I created a $:/wiki/ui/EditTemplate/fieldEditor/multiline tiddler to display tiddler fields as multilined textareas styled to appear like normal inputs until a new line is created, but in the process it removed the color field’s ability to show as input type="color ".

(Another minor tradeoff was the inability to export as .tid, and the need to use .json instead, but that isn’t an issue for me.)

I’m currently trying to use the FieldEditorFilters cascade to apply my multiline to tiddler fields that aren’t color created modified icon, any that could possibly have an input type other than the default, but I’m unable to get it to work.

Is there a better way of doing what I’m attempting to do?

I’d like for the default field template to be the textarea template I’ve created unless it has a different input style from textarea, and maybe in the future to add other custom field types, like birthday with an input of date.

I’d appreciate any suggestions, and I’ve attached what I’ve been working on for reference.

multilineTiddlerFieldsWithHeightOverflow.json (2.4 KB)

Edit: I did forget to put list-before: $:/config/FieldEditorFilters/default in my $:/wiki/FieldEditorFilters/multiline tiddler, but other than that oversight, I was unable to achieve what I was trying to do.

I can help more later but personally I would restrict text area fields to a list of field names that are nominated. there are a lot of good reasons for the default to be single line. Then there will be no need to exclude the color field, you just don’t include it.

  • However using the field editor cascade for a field or set of fields at a time you would rule in the fieldnames that use a given editor.
  • I would like a color editor that works as usual but also allows us to edit and paste into the field, perhaps even drop a color name/number onto the field.
  • I will come back when I have some code

I am working on this, but must put it aside for a little while.

I can see a need to introduce a simple way to add alternative field editors to named fields but also as set in a filter eg; color colour [fields[]suffix[-color]] [fields[]suffix[-colour]] wth ion the cascade mechanisium.

Here is the work in progress for the color fields editor

<style>
.small-field { width: 12em; }
</style>
<span title="Select color"><span title="Edit or drop color code or name"><$edit-text class=small-field field="color" size="10"/> <$edit-text class=small-field type=input field="color" size="10"/></span></span>
  • but the style is not working in the editor.

@TW_Tones,
I like that idea as well, I’ve tinkered with it to match the other fields in tiddlywiki, and attached my modifications.
However, I was still unable to create a cascade filter that can apply this to individual tiddler fields.

Side-note, I never thought to use the title attribute for html tags to get hover-over tooltips, thank you for doing that in your demo, that’s pretty handy to know.

Was there a functionality reason for the edit-text widgets to be double nested in spans? I changed it so that each widget is nested in a single span, I assumed this was the original intent.

colorPickerFieldTemplate.json (751 Bytes)

The intention was simple to have a different tooltip but that was incomplete sorry.

I have one working I can share later, I am away from my computer. I was working to generalise it to all color fields, or all text field…

Returning to this with information incase anyone comes looking for an answer to a similar question.

You can create custom field styles using filtering by following steps shown in the following discussion, and can use the example TW linked for a reference point.