mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-30 01:27:06 +00:00
Extend view widget with plainwikified format
This commit is contained in:
@@ -55,6 +55,9 @@ ViewWidget.prototype.execute = function() {
|
||||
case "htmlwikified":
|
||||
this.text = this.getValueAsHtmlWikified();
|
||||
break;
|
||||
case "plainwikified":
|
||||
this.text = this.getValueAsPlainWikified();
|
||||
break;
|
||||
case "htmlencodedplainwikified":
|
||||
this.text = this.getValueAsHtmlEncodedPlainWikified();
|
||||
break;
|
||||
@@ -135,6 +138,10 @@ ViewWidget.prototype.getValueAsHtmlWikified = function() {
|
||||
return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this});
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsPlainWikified = function() {
|
||||
return this.wiki.renderText("text/plain","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this});
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsHtmlEncodedPlainWikified = function() {
|
||||
return $tw.utils.htmlEncode(this.wiki.renderText("text/plain","text/vnd.tiddlywiki",this.getValueAsText(),{parentWidget: this}));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user