Skip to content

Commit

Permalink
switch viewFormat for output
Browse files Browse the repository at this point in the history
  • Loading branch information
BurningTreeC committed Mar 30, 2024
1 parent b3bea95 commit edc540e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion core/modules/widgets/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,18 @@ ViewWidget.prototype.refresh = function(changedTiddlers) {
} else if(this.viewUpdate && this.viewWikified) {
var refreshed = this.fakeWidget.refresh(changedTiddlers);
if(refreshed) {
var newText = this.fakeNode.textContent;
var newText;
switch(this.viewFormat) {
case "htmlwikified":
newText = this.fakeNode.innerHTML;
break;
case "plainwikified":
newText = this.fakeNode.textContent;
break;
case "htmlencodedplainwikified":
newText = $tw.utils.htmlEncode(this.fakeNode.textContent);
break;
}
if(newText !== this.text) {
this.domNodes[0].textContent = newText;
this.text = newText;
Expand Down

0 comments on commit edc540e

Please sign in to comment.