Copy link to clipboard
Copied
Basic example:
// 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.
I've tried browsing javascript objects created manually or in JS UXP, and I can't detect any difference.
But there is a difference that prevents it from working properly.
Does anyone have any information on this subject?
Many thanks for your help!
Copy link to clipboard
Copied
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!