.dataset().scriptTag().dataset(...).scriptTag(
token: string,
style: IStyleFramework = 'd'
): string
Get a <script> tag for a specific dataset to be displayed as a table. Insert this script tag where you want the table to appear in your HTML.
.token())d - Defaultauto - Auto detectbs - Bootstrap 3bs4 - Bootstrap 4bs5 - Bootstrap 5dt - CloudTables / DataTables default stylingzf - Zurb Foundationju - jQuery UIse - Semantic UIno - No stylingThis method returns a string which contains the HTML <script> tag to use to embed your CloudTable.
const api = new CloudTablesApi('sub-domain', ':apiKey');
let token = await api.token();
let result = api.dataset(':id').scriptTag(token);
Will result in a string such as:
<script
src="https://sub-domain.{domain}/loader/:id/table/d"
data-token="ANnbgUJoKO8qh5fYObpffdNqqgANtVVL"
></script>