On Tuesday, March 24, 2015 at 1:20:08 AM UTC-7, Mat wrote:
>
> Some related questions:
> a) The editor field resulting from Jeds solution is only some 4 cm wide.
> Where (and why) is that set?
> b) The documentation <http://tiddlywiki.com/prerelease/#EditTextWidget>
> on the EditTextWidget, states that
> size - The size of the input field (in characters)
> - what does "in characters" mean? Assuming the following is correct
> syntax, what should I write inside size="..." ?
>
The "size" attribute is passed along to the HTML <input> tag produced by
the widget. This attribute changes the horizontal size of the input field,
using some internal browser calculation to determine how many pixels are
needed to show the indicated number of characters in the current font.
Unfortunately, this is typically a very inaccurate calculation and the
input field will generally be somewhat wider than the actual size needed to
fit the specified character length. You'd be better off defining a CSS
class, like this:
.myEdit input { width:100%; }
and then writing
@@.myEdit <$edit-text .../>@@
c) The doc also states "The content of the <$edit-text> widget is ignored."
>
> ...what does that mean? It is not evaluated/parsed?
>
Just like HTML syntax, TW widgets have both <$widgetname> and
</$widgetname> markers that can surround content. What the widget does
with that content depends entirely on the specfic widget in question. For
example, in the <$list> widget, you typically write something like:
<$list filter="...">
some content here
</$list>
where the content in between <$list> and </$list> is used to render each
item matched by the filter.
However, in the case of the <$edit-text> widget, it doesn't have any use
for content that might be provided in between the <$edit-text> and
</$edit-text> markers. This is why the documentation says, "the content ..
is ignored".
Note also that, because <$edit-text> doesn't need any enclosed content,
there's actually no need for the matching </$edit-text> marker and instead,
a trailing / is placed in the opening widget marker, like this:
<$edit-text ... params... />
and the corresponding </$edit-text> marker is simply omitted.
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
"Inside TiddlyWiki: The Missing Manual"
https://www.indiegogo.com/projects/inside-tiddlywiki-the-missing-manual/x/8816263
Note: the IndieGogo funding campaign has ended,
but direct fundraising continues below...
YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://TiddlyTools.github.com/fundraising.html#MakeADonation
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.