Added htmlAddBoxHelpLink function

This commit is contained in:
2026-01-26 10:28:49 +00:00
parent 40b8c8aa12
commit 49a8834cda
4 changed files with 99 additions and 2 deletions

28
man/htmlAddBoxHelpLink.Rd Normal file
View File

@@ -0,0 +1,28 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/htmlBoxManipulation.R
\name{htmlAddBoxHelpLink}
\alias{htmlAddBoxHelpLink}
\title{Adds a "help" (question mark) icon to a box tools section (right side)}
\usage{
htmlAddBoxHelpLink(box, href, title = NULL)
}
\arguments{
\item{box}{The box to add a help icon/link to}
\item{href}{The help uri to load}
\item{title}{Optional title for the help link. Defaults to box title}
}
\value{
The modified box
}
\description{
The uri to load can have a replacement marker supplied '\%box\%' which will be
substituded with a sanitized copy of the box title. Preference is given to
the slugify package, however if unavailable a warning is generated and the
fallback of URLEncode is used.
}
\examples{
x <- shinydashboard::box(title = "This is a box")
htmlAddBoxHelpLink(x, href = "http://example.com/help-guide#\%box\%")
}