update the view widget

This commit is contained in:
BurningTreeC 2024-03-30 14:17:08 +01:00
parent 84d050b5d5
commit c557789100
2 changed files with 7 additions and 2 deletions

View File

@ -32,7 +32,12 @@ ViewWidget.prototype.render = function(parent,nextSibling) {
this.execute();
var textNode;
if(this.viewUpdate && this.viewWikified) {
this.fakeWidget = this.wiki.makeTranscludeWidget(this.viewTitle,{document: $tw.fakeDocument,importPageMacros: true});
this.fakeWidget = this.wiki.makeTranscludeWidget(this.viewSubtiddler || this.viewTitle,{
document: $tw.fakeDocument,
field: this.viewField,
parseAsInline: this.viewMode !== "block",
parentWidget: this
});
this.fakeNode = $tw.fakeDocument.createElement("div");
this.fakeWidget.makeChildWidgets();
this.fakeWidget.renderChildren(this.fakeNode,null);

View File

@ -21,7 +21,7 @@ The content of the `<$view>` widget is displayed if the field or property is mis
|template |Optional template string used when the `format` attribute is set to "date" |
|subtiddler |Optional SubTiddler title when the target tiddler is a [[plugin|Plugins]] (see below) |
|mode |<<.from-version "5.1.15">> Optional transclusion parsing mode for wikified formats. May be "inline" or "block" (the default) |
|update |<<.from-version "5.3.4">> Optional. If set to "yes", the viewed ''wikified'' text gets updated if its text content changes |
|update |<<.from-version "5.3.4">> Optional. If set to "yes", the viewed text gets updated if its (wikified) text content changes |
!! Formats