Up to 2020 the HTMLPreview action has only one text-edit that is a fixed height.
Given the basic structure of an HTML document a second text-edit could be useful to define the and the section in different fields.
This would add a layer of complexity to the action.
Maybe be there could be a list/stack of text-edits that the user can add. If the GUI would be similar to the action steps UI this would increase the usability of the HTML preview action by hiding long blocks of CSS or script code.
If something is to compact in the request please feel free to ask…
Maybe I’m missing something, but is this not the sort of complexity provided by scripting’s HTMLPreview object? Anything beyond the most simple action steps always switches to the script objects. This looks to be true across the board.
Could be to make it easier for people to apply their own web site structure for previewing posts or to allow for passing in specific content from earlier steps via template tags. A fixed list would preclude those (common?) options, or at least make them harder to maintain (e.g. if you had to create a file first to have it appear in the list).
Maybe the feature change I am aiming at is easily build with different actions (like file or clipboard).
Both do have a “Text Edit” and already can be stacked.
By using a file action, the user could generate files like first:
head.template
css.template
js.template
And then load them into the template tags in a simple script.
The clipboard action would be even more comfortable (I am still writing about non scripting users) by building the header in steps in the keyboard (appending the content) and then using it in a HTML Preview with a template like
[[clipboard]] <!-- this is the header preprocessed in the previous action steps -->
<body>
[[body]]
<!-- some modifications ... ->
If you are just wanting to manage templates as separate components, you could save your partial templates in /iCloud Drive/Drafts/Library/Templates and use the [[template|path]] tag to insert them in an HTMLPreview template. So your HTMLPreview template might look like: