Great tip !! I wasn't looking for this solution- but I will use this:D Thanks,
Mike On Apr 5, 2:48 pm, Eric Shulman <[email protected]> wrote: > > Is it possible to make it so that pressing the enter key in fields > > other than the textarea will trigger saving and closing the tiddler > > like clicking the "done" link? This little quirk of TiddlyWiki has, > > quite honestly, irritated me a whole lot. > > The web standard for handling the enter key in a form does not > automatically submit the form *unless* there is exactly one, and only > one, text input field in that entire form. Thus, because there are > three separate input fields in a typical EditTemplate layout (title, > text, and tags), the enter key does nothing. > > Also, if you are using a customized EditTemplate, you may have > included other types of controls, such as a droplist or a pushbutton, > which apply their own special handling when they process the enter key > (i.e., changing the droplist selection or invoking the button, > respectively). > > Unfortunately, the handling for the enter key can vary somewhat > between platforms and browsers, so implementing any kind of > consistent, cross-browser-compatible, extended handling for the ENTER > key is difficult at best. Fortunately, TiddlyWiki sidesteps these > issues entirely by providing an *alternative* command keystroke: CTRL- > ENTER. > > Pressing the CTRL-ENTER key combination from *any* field in the editor > will immediately invoke the default toolbar command -- which is shown > with a bold font in the tiddler toolbar and is specified using a "+" > prefix in the [[ToolbarCommands::EditToolbar]] slice definition. > > Because the TW standard EditToolbar definition contains > "+saveTiddler", typing CTRL-ENTER from any input field presses the > 'done' button. Although not exactly the same as pressing the ENTER > key, it works reliably across all platforms and controls types, and > I've found that once you get used to it, it becomes second nature and > is just as easy as pressing ENTER. If fact, it's also a bit "safer" > than just using ENTER, in that you are much less likely to > *accidentally* press the combined CTRL-ENTER keystroke before you are > done editing. > > enjoy, > -e > Eric Shulman > TiddlyTools / ELS Design Studios --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~----------~----~----~----~------~----~------~--~---

