Make the tiddler text prompt be a placeholder

print-window-tiddler
Jermolene 2013-12-20 17:07:15 +00:00
rodzic 062c4e5400
commit 79046c52b4
2 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -329,7 +329,7 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
// Create the draft tiddler
var draftTitle = this.generateDraftTitle(title),
draftTiddler = new $tw.Tiddler({
text: "Type the text for the new tiddler"
text: ""
},templateTiddler,{
title: draftTitle,
"draft.title": title,

Wyświetl plik

@ -1,6 +1,9 @@
title: $:/core/ui/EditTemplate/body
tags: $:/tags/EditTemplate
\define prompt()
Type the text for this tiddler
\end
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
<div class="tw-tiddler-preview">
@ -8,11 +11,11 @@ tags: $:/tags/EditTemplate
<$transclude />
</div>
<div class="tw-tiddler-preview-edit">
<$edit field="text" class="tw-edit-texteditor"/>
<$edit field="text" class="tw-edit-texteditor" placeholder=<<prompt>>/>
</div>
</div>
</$reveal>
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
<$edit field="text" class="tw-edit-texteditor"/>
<$edit field="text" class="tw-edit-texteditor" placeholder=<<prompt>>/>
</$reveal>