Copy link to clipboard
// currentPage = the current page InDesign
let htmlContent = '<p>Hello</p>';
This code works partially.A block is created in the InDesign layout and the HTML code is correctly assigned.
But it doesn't work in the HTML preview or in a digital publication.
If the HTML block is created manually in the InDesign interface, there is an additional step which "validates" the specificity of the HTML block.
Does anyone have any information on this subject?
Many thanks for your help!
I found a (not very clean) workaround.
I manually created an Html block in a hidden layer.I use this Html block as the master element and duplicate and customize it with UXP JS as many times as necessary.Ideally, I'd like to be able to create an Html block with JS UXP from scratch.
Thanks for your insights!