diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index aaea75632..08b53d71d 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -1,6 +1,11 @@ title: $:/core/macros/tag-picker tags: $:/tags/Macro +\define add-tag-actions() +<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/> +<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> +\end + \define tag-button() <$button class="tc-btn-invisible" tag="a"> $(actions)$ @@ -13,7 +18,9 @@ $(actions)$ <$set name="actions" value="""$actions$""">
+<$keyboard key="ENTER" actions=<>> <$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle"/> + <$button popup=<> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}} <$set name="tag" value={{$:/temp/NewTagName}}> <$button set="$:/temp/NewTagName" setTo="" class=""> diff --git a/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid b/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid index 2a4d4d7fc..a0b018fdd 100644 --- a/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid +++ b/editions/tw5.com/tiddlers/howtos/KeyboardShortcuts.tid @@ -10,4 +10,9 @@ Keyboard shortcuts are available for common editing operations: * Abandoning changes to the draft tiddler containing the keyboard focus (defaults to escape) * Formatting operations from the tiddler editing toolbar (see the tooltips) -The current shortcuts can be inspected and customised in the "Keyboard Shortcuts" tab of [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}}. \ No newline at end of file +The current shortcuts can be inspected and customised in the "Keyboard Shortcuts" tab of [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}}. + +!! Special Keys + +; adding tags in the editor +: <<.from-version 5.1.14>>: if you hit escape in the new tag input, the tag will be added \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid b/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid index 1ca1bd1e2..9f2d54715 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Creating and editing tiddlers.tid @@ -21,7 +21,7 @@ To edit an existing tiddler, click the {{$:/core/images/edit-button}} button at When you create a new tiddler or edit an existing one, the tiddler will go into draft mode. This presents a control panel for modifying the tiddler in various ways. It has several parts, from top to bottom: *''The title field'' - Use this to change the title of the tiddler -*''The tag selector'' - Use this to add or remove tags. As you type a tag name in the box, a dropdown list will show you any existing tags that match. You can pick from this list or create a completely new tag. Then click the ''add'' button to add the tag to the tiddler. Each tag is shown as a coloured pill. Click the "×" on a pill to remove that tag +*''The tag selector'' - Use this to add or remove tags. As you type a tag name in the box, a dropdown list will show you any existing tags that match. You can pick from this list or create a completely new tag. Then click the ''add'' button or hit the Enter key to add the tag to the tiddler. Each tag is shown as a coloured pill. Click the "×" on a pill to remove that tag *''The text area'' - Use this to edit the main content of the tiddler. Click the ''preview'' button ({{$:/core/images/preview-closed}} / {{$:/core/images/preview-open}}) to see what your changes will look like *''The type selector'' - Use this when a tiddler needs to be displayed in a special way, such as an image. See ContentType for a list of the options. The default is `text/vnd.tiddlywiki`, which means the tiddler contains WikiText *''The field selector'' - Use this to add or remove fields on the tiddler. For example, if you are editing a tiddler that's being used to tag other tiddlers, you can add a [[''list'' field|ListField]] to change the order in which those tiddlers will be listed diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index dfbfb576f..67c0b42b8 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1159,6 +1159,10 @@ html body.tc-body.tc-single-tiddler-window { width: 50%; } +.tc-edit-add-tag .tc-keyboard { + display:inline; +} + .tc-edit-tags .tc-tag-label { display: inline-block; } @@ -2318,4 +2322,4 @@ body.tc-dirty span.tc-dirty-indicator, body.tc-dirty span.tc-dirty-indicator svg .tc-error { background: #f00; color: #fff; -} +} \ No newline at end of file