FYI I have solved this one. The app gets in a pickle with single and double quotes on the auto-generated code.
Code in sample above [wp_jdt id=”demo”]
<table id=’demo’ width=’100%’>
It is safer to put
[wp_jdt id=demo]
<table id=demo width=’100%’>
Hope that helps someone else.