Giving Edit > Copy As > JavaScript a bit of a workout here …
It’s not at all an easy thing to get completely right first time, and I’m focusing on it simply because it seems likely to be a learner’s first port of call, and is a very useful instrument for getting to understand how omniJS works within OG.
One remaining glitch is that in the current release build, if a learner copies a table which includes a gap (one or more cells deleted):
then the generated JS code will move the gap, and scramble some of the remaining cell positions, if it is run to reproduce or ‘paste’ the copied table:
The top row looks ok, but the others have been both gap-shuffled and unexpectedly reversed.
( A separate bug (see other posts) causes omniJS to render the default horizontal text alignment incorrectly when the code doesn't explicitly specify the alignment - omniJS was implicitly asking for centered text here, and thinks that it has given it, but has somehow been let down (on macOS, not iOS) in the details of the rendering - the inspector actually shows 'centered' for these cells, but the display doesn't match the reported state of the model)
iOS version Cells still scrambled, but text properly centered, though we had to change the font name to get the code to run on iOS – the iOS system lacked the ‘Monaco’ font specified in the Copy As > JavaScript code: