Mario,
This sounds interesting can you please clarify. Are you saying, Such
"field" definitions would make the content in the field pragma become a
value of this "Virtual Field". If I use edit-text I can name such fields
and edit them as if they were independent fields but I would only be
editing part of the text field where this definition resides?
- If my above understanding is correct perhaps it would be misleading to
call them fields, although they will behave as such. Perhaps they could be
considered "sections" that are addressable like fields.
- Will they be able to be made global, or defined in a tiddler tagged
view template?
- Can we then display them conditionally?
If this interpretation that they are like sections is correct then it could
allow code modularisation within a Tiddler, such that sections of code are
defined at the top and included below in a structured form.
Thanks for your innovative thinking
Tony
On Thursday, May 9, 2019 at 12:56:58 AM UTC+10, PMario wrote:
>
> Hi Folks,
>
> Just reading an other thread in the group: Change initial field/textarea
> setup <https://groups.google.com/forum/#!topic/tiddlywiki/g4dHKMJOSSw>.
> I had an idea about multi line fields, which are requested here quite a
> bit.
>
> The default UI for inserting fields is a bit "heavy weight", if you have
> many of them. AND because of the concept, how fields are stored in the html
> file and the .tid file, it's not possible to use line breaks atm.
>
> The idea now is, to use the text area for "multi-line" fields. This
> wouldn't change the .tid file spec, because those fields are part of the
> text area.
>
> We already know macro definition pragma <https://tiddlywiki.com/#Pragma>
> in tiddlers eg:
>
> \define test()
> Paragraph 1
>
> Paragraph 2
> \end
>
>
> <<test>>
>
> A similar "pragma" could be used to define fields. eg:
>
> \field my-field
> Paragraph 1
>
> Paragraph 2
> \end
>
> {{!!my-field}}
>
>
> The macro parser does exist already. So the field parser should be very
> similar. ...
>
> PROS
>
> - This idea, wouldn't need to change the .tid file format, like other
> ideas discussed here.
> - Database recorde-like tiddlers that contain many different fields,
> wouldn't need much UI witchery
> - They could be easily copy / pasted in text edit mode
> - If new "field-text" is added to old TWs, it will be recognized, as
> "plain text"
> - NO new edit-multiline-field widget needed, since the existing
> edit-widget should do it.
> - We need to test this.
> - If users want a form-like UI this is the same work as now.
>
> CONS
>
> - There is some overhead for \field start end \end
> - Since existing versions of TW don't ignore unknown pragmas, the new
> text format wouldn't be backwards compatible.
> - but it wouldn't hurt too much (see pros above)
> - New .tid templates will be needed.
> - may be fields-widget will need some extensions
>
> -------- *A little bit more "specs"* ----------
>
> 1) field names must be lower-case (same a now)
> 2) Fields, that contain 1 line of text stay in the text area eg:
>
> \field my-field
> 1 line of text
> \end
>
> 3) "1 liners" will be converted into fields when the tiddler is saved eg:
> - they go to the field input area of the edit-template
> (probably worth more discussion)
>
> \field test-field 1 line of text
>
> 4) multi-line fields will always be transcluded in "block-mode" like
>
> <$transclude tiddler=x field="my-field" mode=block/> even if the shortcut
> is used: {{!!my-field}}
>
> 5) ... ???
>
> just some thoughts
>
> @Jeremy and others
> What do you think?
>
> have fun!
> mario
>
>
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/a0e99e90-e0fd-41f1-81c8-e46af01174ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.