Skip to contents

The text_selection() function adjusts how text is selected within a tag element when the user clicks on the element.

Usage

text_selection(x, select)

Arguments

x

A tag element or .style pronoun.

select

A character string specifying how text is selected. One of,

  • "all"

  • "auto"

  • "none"

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    text_selection("all"),
  "Click to select all the text"
)
#> <div class="user-select-all">Click to select all the text</div>