Document Generation Api: HTML Tag Support
- April 25, 2023
- 0 replies
- 333 views
I see that there are a few HTML elements that are supported the Document Generation API (https://developer.adobe.com/document-services/docs/overview/document-generation-api/stylingformattingtags/#tags-supported)
Are there any plans to support any additional elements? In our application, we are using multiple WYSIWYG editor instances that are combined in a DOCX template to create a multi-page word file
The current support for HTML elements is a great first step, but we have several use cases for <ol> and <li> elements. Lists (https://developer.adobe.com/document-services/docs/overview/document-generation-api/templatetags/#lists) will not work, as the user enters content using the WYSIWYG and the data isn't structured.
Are there any work-arounds to accept ordered/unordered lists via JSON? Sample data and output is below
{
"sections": [
{
"title": "Summary",
"rank": {
"formatted": "0,4,No Rank",
"text": "No Rank",
"value": 0
},
"body": {
"html": "<p>Hi. This is a paragraph with <strong>bold</strong> and <em>italic</em> styles.</p><p>Below is a table:</p><table style=\"width:100%\"><tbody><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></tbody></table><p>Here are a few lists</p><ul><li>Unordered list item 1</li><li>Unordered list item 2<ul><li>Sub list item 1</li><li>Sub list item 2</li></ul></li></ul><ol><li>Ordered List Item 1<ol><li>Sub list item 1</li><li>Sub list item 2</li></ol></li><li>Ordered list item 1</li></ol>"
}
},
{
"title": "Summary 2",
"rank": {
"formatted": "0,4,No Rank",
"text": "No Rank",
"value": 0
},
"body": {
"html": "<p>Hi. This is a paragraph with <strong>bold</strong> and <em>italic</em> styles.</p><p>Below is a table:</p><table style=\"width:100%\"><tbody><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></tbody></table><p>Here are a few lists with <strong>explicit styles</strong></p><ul style=\"list-style-type: disc\"><li>Unordered list item 1</li><li>Unordered list item 2<ul style=\"list-style-type: disc\"><li>Sub list item 1</li><li>Sub list item 2</li></ul></li></ul><ol type=\"1\"><li>Ordered List Item 1<ol type=\"1\"><li>Sub list item 1</li><li>Sub list item 2</li></ol></li><li>Ordered list item 1</li></ol>"
}
}
}
