mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-01 16:26:57 +00:00
Edit text widgets should use default text for missing fields
This commit is contained in:
parent
55e44a9554
commit
d6ea369f5e
@ -103,7 +103,11 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
|
||||
var tiddler = this.wiki.getTiddler(this.editTitle);
|
||||
if(tiddler) {
|
||||
// If we've got a tiddler, the value to display is the field string value
|
||||
value = tiddler.getFieldString(this.editField);
|
||||
if(tiddler.hasField(this.editField)) {
|
||||
value = tiddler.getFieldString(this.editField);
|
||||
} else {
|
||||
value = this.editDefault || "";
|
||||
}
|
||||
if(this.editField === "text") {
|
||||
type = tiddler.fields.type || "text/vnd.tiddlywiki";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user