Skip to content

Commit

Permalink
Edit text widgets should use default text for missing fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Mar 31, 2021
1 parent 55e44a9 commit d6ea369
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/modules/editor/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit d6ea369

Please sign in to comment.