Skip to contents

Starts a codehover HTML table. This is the low-level building-block API: use it when you want full control over the row text and the images (any images, any pseudo-code). For automatic splitting of ggplot code, see [ch_hover()].

Usage

ch_int(
  type = c("incremental", "one_row"),
  layout = c("auto", "row", "column"),
  css_class = "",
  table_tag_add = "",
  div_tag_add = "",
  ...
)

Arguments

type

(string) Type of hover effect, "incremental" (default, highlights the hovered row and every prior row) or "one_row".

layout

(string) Placement of the image relative to the code table: "auto" (default) puts them side by side when there is room and wraps the image below otherwise (responsive); "row" forces side by side, shrinking the image if needed; "column" forces the image below the code.

css_class

(string) Extra CSS class added to the container, for custom styling.

table_tag_add

(string) Additional HTML attributes for the `<table>` tag.

div_tag_add

(string) Additional HTML attributes for the `<div>` wrapping the table.

...

Additional parameters.

Value

The beginning of an HTML table (string), to be passed to [ch_row()].

Examples

ch_int(type = "one_row", layout = "column")
#> [1] "<div class='codehover codehover-onerow codehover-layout-column '><div class='codehover-code' ><table >"