mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-02 14:44:07 +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);
|
var tiddler = this.wiki.getTiddler(this.editTitle);
|
||||||
if(tiddler) {
|
if(tiddler) {
|
||||||
// If we've got a tiddler, the value to display is the field string value
|
// If we've got a tiddler, the value to display is the field string value
|
||||||
|
if(tiddler.hasField(this.editField)) {
|
||||||
value = tiddler.getFieldString(this.editField);
|
value = tiddler.getFieldString(this.editField);
|
||||||
|
} else {
|
||||||
|
value = this.editDefault || "";
|
||||||
|
}
|
||||||
if(this.editField === "text") {
|
if(this.editField === "text") {
|
||||||
type = tiddler.fields.type || "text/vnd.tiddlywiki";
|
type = tiddler.fields.type || "text/vnd.tiddlywiki";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user