1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-13 17:16:48 +00:00

Add warning for bad characters when editing tiddler titles

Fixes #2351
This commit is contained in:
Jermolene 2016-03-31 11:14:15 +01:00
parent 5e720c0d57
commit 12661f5cda
2 changed files with 16 additions and 1 deletions

View File

@ -21,6 +21,7 @@ Tags/Add/Button: add
Tags/Add/Placeholder: tag name
Tags/Dropdown/Caption: tag list
Tags/Dropdown/Hint: Show tag list
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
Type/Dropdown/Caption: content type list
Type/Dropdown/Hint: Show content type list
Type/Delete/Caption: delete content type

View File

@ -1,4 +1,18 @@
title: $:/core/ui/EditTemplate/title
tags: $:/tags/EditTemplate
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus="true"/>
<$vars pattern="""[\|\[\]{}"]""" bad-chars="""`| [ ] { } " '`""">
<$list filter="[is[current]regexp:draft.title<pattern>]" variable="listItem">
<div class="tc-message-box">
{{$:/language/EditTemplate/Title/BadCharacterWarning}}
</div>
</$list>
</$vars>
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus="true"/>