Byo_clipboard.With_statusWith_status variants of all the copy functions. These return whether a copy was recently performed so UI components can display a status indicator.
val copy_text :
string Bonsai_web.Bonsai.t ->
Bonsai_web.Bonsai.graph @ local ->
t Bonsai_web.Bonsai.tAn effect that copies the given text to the clipboard.
val copy_html :
string Bonsai_web.Bonsai.t ->
Bonsai_web.Bonsai.graph @ local ->
t Bonsai_web.Bonsai.tAn effect that copies the given text as text/html to the clipboard.
val copy_link :
url:string Bonsai_web.Bonsai.t ->
title:string Bonsai_web.Bonsai.t ->
Bonsai_web.Bonsai.graph @ local ->
t Bonsai_web.Bonsai.tAn effect that copies a link to the clipboard using both text/html (<a> tag) and text/plain MIME types. This provides rich formatting where supported with plain text fallback.
val copy_text_factory :
Bonsai_web.Bonsai.graph @ local ->
(?key:string -> string -> t) Bonsai_web.Bonsai.tCreates a copy_text factory for use in environments where it would otherwise be awkward or impossible to thread graph around.
By default, the text-to-copy is used as the indentifier for the status. The optional key parameter allows distinguishing between multiple copy buttons that have the same text.