I came to the forum today to ask about this very issue mentioned by @TW_Tones. It seems @pmario is pointing to functions to do something like this kind of work. I confess I understand nothing about functions yet, and am not ready for a steep learning curve at the moment.
So maybe someone can give me perspective on this very specific challenge (whether or not that becomes my front door to appreciating functions). I need to take the output of
<$view tiddler="$:/springer/template/alt" format="htmlwikified"/>
(itself evaluated within a <$list>
widget, so each tiddler is being transcluded with the template) — and then do stuff with that resulting html sequence (starting by trimming out leading and trailing <p>
strings, and eventually making a button to copy that modified html string to the clipboard).
I’ve been struggling with it for a while. It seems only the <$view>
widget can help me achieve the htmlwikified format I need, but then I don’t see how to pass this widget-result to the clipboard. (I have no trouble getting simple html-format contents of this or that field to the clipboard, but in this case I’m trying to get the html for a complex template result.)
The workaround so far (in case it helps make the goal vivid) involves making a new tiddler, setting the template-transclusion string into its text field, and using the view-html option in the internals plugin to display the desired full-template html, and then try to select all that html in the right-hand pane. Rinse and repeat for each desired tiddler on the list.
(In case anyone is tempted to give me other html-tiddler-export advice: there are very annoying reasons why I need to get this html directly onto the clipboard for further handling. I’m pasting the results to moodle (university LMS), which strips out all style tags and css declarations tags. So I need to handle and massage the html on the clipboard way more than what any normal workflow would require.)
Many thanks for any insight! And maybe responses to this challenge will help orient people to analogous cases where widget output wants to get taken up for further handling…