Getting the HTML from a tiddler #7496
-
In JS, how do I parse a tiddler and get the HTML from it? I need it as a string. I was thinking I could find something like it in the export code, but I actually can't find the export code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The tiddler $:/state/editpreviewtype contains the preview type, that you can select in tiddler edit mode with the preview selector. It points to: $:/plugins/tiddlywiki/internals/EditTemplate/body/preview/raw, which contains the code, how it is implemented. See the follwing code. So it uses the view-widget with the
The wikify-widget has similar functionality and parameters. The JS function which can render a tiddler is .renderTiddler = function(outputType,title,options) { ... Also have a closer look at the functions directly above this one
IMO that should give you most of the pointers you'll need. |
Beta Was this translation helpful? Give feedback.
The tiddler $:/state/editpreviewtype contains the preview type, that you can select in tiddler edit mode with the preview selector.
It points to: $:/plugins/tiddlywiki/internals/EditTemplate/body/preview/raw, which contains the code, how it is implemented.
See the follwing code. So it uses the view-widget with the
currentTiddler
as the defaulttiddler
parameter.The wikify-widget has similar functionality and parameters.
The JS function which can render a tiddler is .renderTiddler = function(outputType,title,options) { ... Also have a closer look at the functions directly above this one