Export as String
Export an element markup into a variable
Last updated
Export an element markup into a variable
Last updated
When this option is checked the HTML markup that would be exported is wrapped in quotes inside of a script block and assigned to a JavaScript variable.
For example, let's say you have a Rectangle:
if you export a Rectangle this is the code that is exported:
If you enable the Export as String option this is the code that is exported:
The rectangle will not be shown on the page but the page will contain a variable that contains that code. The CSS of the rectangle is still defined in the stylesheet.
This comes in handy when you have an unknown number of items in a list, repeat grid or in a grid layout.
Having access to the HTML markup of an item in JavaScript allows you to create more copies of it.
The name of the variable is the name or id of the element.