Andrew Stratton
12/04/2025, 3:03 PM<div data-quando-block-type="media-text" class="quando-block"
data-quando-javascript="quando.text($(eq$,${txtval}$,input$,'${text}'$,${txtval})$,${append},${newline})">
<div class="quando-left quando-media"></div>
<div class="quando-right">
<div class="quando-row quando-media">
<span class="iconify">abc</span>
<select data-quando-name="append" class='quando-toggle'>
<option value="false">Show</option>
<option value="true">Add</option>
</select>
Text
<span data-quando-toggle='txtval=input'>
"<input data-quando-name="text" type="text" value=""
data-quando-encode='normal' />"
</span>
<select data-quando-name='newline' class='quando-toggle'>
<option value='false'> </option>
<option value='true'>⤶</option>
</select>
<!-- + options removed -->
</div>
</div>
</div>
At present I just paste the html into the relevant div - but this won't work for compose. Hot reload 'could' do this but is an IDE feature - so not suitable for separate builds.
Note that there are 200+ blocks at present, so a switch statement would be a maintenance nightmare...I could put them all in a list and iterate through - but that seems smelly...
Thank you in advance - AndyMohamed Darwish
12/06/2025, 10:54 AMCoty Saxman
12/08/2025, 2:34 AMLazyList() { items(appState.nodes) { node -> node.render() } }
Nodes that wrap other nodes (like your 'every' example) should be represented as a single node with a property that contains a list of nodes they contain. In other words, the node list will be multi-dimensional, containing nested lists of nodes, not a flattened list.
The need to generate/inject javascript into a new Window is also not really a problem: just use document.write() as you would in normal javascript code. And don't worry about rewriting the javascript during drag events. Wait til the state change is finalized before bothering with that, and things should go much smoother.
Each of your nodes will need a rendering function and a javascript export function.
I think that's about everything, but let me know if I've missed one of your problems!Andrew Stratton
12/08/2025, 10:01 AMAndrew Stratton
12/08/2025, 3:42 PM