def bootstrap_options(
    table: str, selectable=False, id_col="Compound_Id", height=1200
) -> str:
    """Apply some common Bootstrap options to the table.

    Arguments:
        table: The HTML table as string, the output from a x.to_html() call.
        height (int): Defines the height of the table and enables a fixed header.

    Returns:
        The new table string with the options included."""

    replace_list = [
        '<table border="1" ',
        'id="table" ',
        'data-toggle="table" ',
        'data-show-columns="true" ',
        'data-search="true" ',
        'data-sortable="true" ',
        # 'style="width: 400px; ',
        'style="width: auto !important" ',
    ]
    if height > 0:
        replace_list.append(f'data-height="{height}" ')

    if selectable:
        replace_list.extend(
            [
                'data-click-to-select="true" ',
                'data-toolbar=".btn-primary" ',
                'data-id-field="id" ',
                'data-select-item-name="id" ',
            ]
        )

    replace_list.append(">")
    replace_str = "".join(replace_list)
    result = table.replace('<table border="1" class="dataframe">', replace_str)
    if selectable:
        result = result.replace(
            "<th>$Sel$</th>", '<xxx data-field="state" data-checkbox="true"></th>'
        )
        result = result.replace(
            f"<th>{id_col}</th>", f'<th data-field="id">{id_col}</th>'
        )
    result = result.replace("<th>Molecule", "<xxx>Molecule")
    # Make sortable:
    result = result.replace("<th>", '<th data-sortable="true">')
    result = result.replace("<th ", '<th data-sortable="true" ')
    # Restore headers disabled for sorting:
    result = result.replace("<xxx", "<th")
    return result