The only problem I have is that I want to use <<option
txtBackupOptionsFormat>> and have the user be able to set his or her
own format. I have the input element showing up just fine and I can
edit it, but it is only a dozen or so characters wide - not nearly long
enough in my opinion. I would like to expand the bar to be at least
50% of the screen, so longer format definitions can be used.
For example, my default format is "%N.%Y%M%D.%h%m%s%n.html", and it
only shows "%N.%Y%M%D.%h" before the text area chops it off. This
minor annoyance wouldn't be too bad, but it looks like the
config.macros.option.onChangeOption() function is changing the text
area - every time I type a character, the input area shows me where the
cursor is (way at the end) and immediately bounces back to the
beginning. The cursor doesn't move - the portion of the shown text is
what changes.
My questions:
1) Can the text area box be enlarged for just this one tiddler and not
all tiddlers? I'm a little rusty with CSS and I didn't dig deep enough
to check this out.
2) Can the refocusing thing be removed somehow?
I am using FireFox 1.0.8 + TiddlyWiki 2.1.3. If you want my
BackupOptionsPlugin tiddler, let me know and I'll stick it on the web
somewhere.
using http://www.TiddlyTools.com/#InlineJavascriptPlugin, you can
write:
<<option txtBackupOptionsFormat>><script>
place.lastChild.style.width="25em"; // adjust width to suit
</script>
HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
It seems like "bad form" for one plugin to require another plugin to
merely be configured. It kinda works as-is and I would rather not
introduce a dependency that isn't required for the functionality of
mine.
OK... here's the core solution... using no other plugins...
It turns out that the <<option>> macro takes a SECOND param which can
be used to set the 'size' attribute of the input field.
<<option txtUserName 40>>
(change the 40 to any value you want... the default when omitted is 15)
Note that this does not provide precise control over the size of the
input field, because the rendering of the input field with a 'size'
attribute is browser-specific and seems to vary wildly from platform to
platform. Nonetheless, while not as accurate as CSS, setting this
size param will let you force the field to be bigger than the default.
enjoy,
This does not work for me. I reviewed the
config.macros.option.handler() function for the main TiddlyWiki site
and for TiddlyTools. I didn't find anything that referred to parms[1]
or higher. Is this syntax for a version of TiddlyWiki that is not yet
released on tiddlywiki.com? If so, I will be content and add the
second parameter to the option tag in my plugin and rest easy knowing
that soon it will be supported.
I'm somewhat interested why a style parameter isn't used instead of
just a size parameter. <<option txtUserName "width: 40em">> would seem
to make more sense and allow more flexiblity.
Thanks for the great support I've received on this list.
-- Tyler
oops! You are right. This feature is NOT part of the core... it seems
that BidiX's UploadPlugin is redefining the option.handler() to support
type='password' input fields, and ALSO adds the support for the second
param to set the size.
> I'm somewhat interested why a style parameter isn't used instead of
> just a size parameter. <<option txtUserName "width: 40em">> would seem
> to make more sense and allow more flexiblity.
I think that is a fine idea. I will create a ticket to suggest it as a
core enhancement.
In the mean time, you could add this code to your plugin:
setStylesheet(".wideInput input { width:40em;
}","fidianPluginStylesheet");
Then, where you place your checkbox option, you can use:
{{wideInput{<<option txtUserName>>}}}
Of course, you can change the CSS (and the stylesheet ID) to suit your
tastes.
oops! You are right. This feature is NOT part of the core... it seems
that BidiX's UploadPlugin is redefining the option.handler() to support
type='password' input fields, and ALSO adds the support for the second
param to set the size.
I think that is a fine idea. I will create a ticket to suggest it as a
core enhancement.