Skip to contents

These two buttons connect to the history of the session. They become enabled and disabled as the history permits. You thus do not have to write an observer on the server.

Usage

rewind_buttons(undo_label = "Undo", redo_label = "Redo", class = NULL)

Arguments

undo_label, redo_label

The button labels. Use NULL for a button with an icon only. The function then sets the accessible name (aria-label) to "Undo" or "Redo". A screen reader can thus announce the button correctly when it has no text.

class

More CSS classes for the container element. The buttons have the classes btn btn-default. Bootstrap themes thus apply to them.

Examples

rewind_buttons()
#> <div class="rewind-buttons">
#>   <button type="button" class="btn btn-default rewind-undo" disabled title="Undo (Ctrl+Z)" aria-label="Undo">
#>     &#8630;
#>     <span class="rewind-label">Undo</span>
#>   </button>
#>   <button type="button" class="btn btn-default rewind-redo" disabled title="Redo (Ctrl+Shift+Z or Ctrl+Y)" aria-label="Redo">
#>     &#8631;
#>     <span class="rewind-label">Redo</span>
#>   </button>
#> </div>
rewind_buttons(undo_label = NULL, redo_label = NULL)
#> <div class="rewind-buttons">
#>   <button type="button" class="btn btn-default rewind-undo" disabled title="Undo (Ctrl+Z)" aria-label="Undo">&#8630;</button>
#>   <button type="button" class="btn btn-default rewind-redo" disabled title="Redo (Ctrl+Shift+Z or Ctrl+Y)" aria-label="Redo">&#8631;</button>
#> </div>