inst/examples/09-selectionId/ui.R

library(shinyAce)

shinyUI(
  pageWithSidebar(
    headerPanel("ShinyAce with cursor position and selection"),

    sidebarPanel(
      helpText(HTML("<p>AceEditor with `cursorId`, and `selectionId`: observe the events being reported as you either move the cursor in the editor or select text.</p>")),
      tags$hr(),
      verbatimTextOutput("log"),
      width = 6
    ),
    mainPanel(
      aceEditor(
        outputId = "ace",
        value = "Move the cursor inside the editor and\nselect one or more words ...",
        cursorId = "cursor", selectionId = "selection",
        height = "200px"
      ),
      width = 6
    )
  )
)

Try the shinyAce package in your browser

Any scripts or data that you put into this service are public.

shinyAce documentation built on May 6, 2022, 9:07 a.m.