├── LICENSE ├── .gitignore ├── .Rbuildignore ├── inst ├── images │ ├── card.png │ ├── ghcard.png │ ├── chrome_snap.png │ ├── default_snap.png │ ├── python_snap.png │ └── other_init_snap.png └── rstudio │ └── addins.dcf ├── R ├── addin.R ├── carbonace.R └── settings.R ├── NAMESPACE ├── carbonace.Rproj ├── DESCRIPTION ├── LICENSE.md ├── man ├── carbonace.Rd └── ace_settings.Rd └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2020 2 | COPYRIGHT HOLDER: Jonathan Sidi 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^carbonace\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^LICENSE\.md$ 4 | -------------------------------------------------------------------------------- /inst/images/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yonicd/carbonace/HEAD/inst/images/card.png -------------------------------------------------------------------------------- /inst/images/ghcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yonicd/carbonace/HEAD/inst/images/ghcard.png -------------------------------------------------------------------------------- /inst/images/chrome_snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yonicd/carbonace/HEAD/inst/images/chrome_snap.png -------------------------------------------------------------------------------- /inst/images/default_snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yonicd/carbonace/HEAD/inst/images/default_snap.png -------------------------------------------------------------------------------- /inst/images/python_snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yonicd/carbonace/HEAD/inst/images/python_snap.png -------------------------------------------------------------------------------- /inst/images/other_init_snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yonicd/carbonace/HEAD/inst/images/other_init_snap.png -------------------------------------------------------------------------------- /inst/rstudio/addins.dcf: -------------------------------------------------------------------------------- 1 | Name: carbonace 2 | Description: Initialize carbonace 3 | Binding: carbonace_addin 4 | Interactive: true 5 | 6 | -------------------------------------------------------------------------------- /R/addin.R: -------------------------------------------------------------------------------- 1 | #' @importFrom rstudioapi getSourceEditorContext 2 | carbonace_addin <- function(){ 3 | adi <- rstudioapi::getSourceEditorContext() 4 | carbonace(init = adi$selection[[1]]$text) 5 | } 6 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(ace_settings) 4 | export(carbonace) 5 | import(shiny) 6 | import(snapper) 7 | importFrom(rstudioapi,getSourceEditorContext) 8 | importFrom(shinyAce,aceEditor) 9 | importFrom(shinyAce,getAceModes) 10 | importFrom(shinyAce,getAceThemes) 11 | importFrom(shinyAce,updateAceEditor) 12 | importFrom(shinyjqui,jqui_resizable) 13 | -------------------------------------------------------------------------------- /carbonace.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: No 4 | SaveWorkspace: No 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | PackageRoxygenize: rd,collate,namespace 22 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: carbonace 2 | Title: Convert shinyAce to Images 3 | Version: 0.0.2 4 | Authors@R: person(given = "Jonathan", family = "Sidi", role = c("aut", 5 | "cre"), email = "first.last@example.com", comment = c(ORCID = 6 | "0000-0002-4222-1819")) 7 | Description: Converts shinyAce to images to make it simple to share code. 8 | License: MIT + file LICENSE 9 | Depends: R (>= 3.5.0) 10 | Imports: shiny,shinyAce,snapper,shinyjqui,rstudioapi,utils 11 | Remotes: yonicd/snapper 12 | Encoding: UTF-8 13 | LazyData: true 14 | Roxygen: list(markdown = TRUE) 15 | RoxygenNote: 7.1.0 16 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2020 Jonathan Sidi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /man/carbonace.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/carbonace.R 3 | \name{carbonace} 4 | \alias{carbonace} 5 | \title{carbonace shinyapp} 6 | \usage{ 7 | carbonace( 8 | init = "x <- 1", 9 | viewer = shiny::paneViewer(), 10 | ace_opts = ace_settings() 11 | ) 12 | } 13 | \arguments{ 14 | \item{init}{character, intial script to initialize shinyAce with.} 15 | 16 | \item{viewer}{which \link[shiny:viewer]{viewer} to open the app in. Default: shiny::paneViewer()} 17 | 18 | \item{ace_opts}{user specific settings tp pass to the \link[shinyAce:aceEditor]{aceEditor}. 19 | Default: \link[=ace_settings]{ace_settings()}} 20 | } 21 | \description{ 22 | shinyapp to convert shinyAce to images for code sharing 23 | } 24 | \details{ 25 | \itemize{ 26 | \item The app has an RStudio addin, which you can highlight text in the editor 27 | and the app will initialize with the contents. 28 | \item use \link[=ace_settings]{ace_settings()} to set user specific values for the editor. 29 | } 30 | 31 | Default options are:\tabular{ll}{ 32 | \strong{Field} \tab \strong{Value} \cr 33 | theme \tab "ambience" \cr 34 | mode \tab 'r' \cr 35 | fontSize \tab 12 \cr 36 | tabSize \tab 4 \cr 37 | value \tab init \cr 38 | wordWrap \tab TRUE \cr 39 | autoScrollEditorIntoView \tab TRUE \cr 40 | maxLines \tab Inf \cr 41 | placeholder \tab "Show a placeholder when the editor is empty ..." \cr 42 | } 43 | } 44 | \examples{ 45 | if(interactive()){ 46 | carbonace:::carbonace() 47 | 48 | # Use ace_settings to change initial theme 49 | # carbonace:::carbonace(ace_opts = ace_settings(theme = 'chrome')) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # carbonace 2 | 3 | Wanna tweet a pretty screenshot of your code like the pros? 4 | 5 | 6 | 7 | Script inspired from @nujcharee baby :shark: loop [tweet](https://twitter.com/Nujcharee/status/1102607275989049346) ht @maelle 8 | 9 | **What it is**: 10 | 11 | A shiny app that converts the ace editor as high resolution images to share that are as pretty and crisp as [carbon](https://carbon.now.sh/), but simplified for `R`! The app is built on top of a more general package that can snap images of any element in a shiny app called [snapper](https://github.com/yonicd/snapper). 12 | 13 | **Pluses**: 14 | 15 | - Do not have to be online 16 | - Do not have to go to a specific site 17 | - Host locally with your own R installation 18 | - Seamlessly move from source editor to image 19 | 20 | **Minuses**: 21 | 22 | - ace (via [shinyAce](https://github.com/trestletech/shinyAce)) can manipulate less features than [carbon](https://carbon.now.sh/) 23 | 24 | ## installation 25 | 26 | ```r 27 | remotes::install_github('yonicd/carbonace') 28 | ``` 29 | 30 | ## How to Run 31 | 32 | ### Rstudio Addin 33 | 34 | Highlight text in source editor and then invoke the carbonace addin. 35 | 36 | The highlighted text will be used as the initial value 37 | 38 | 39 | ### Console 40 | 41 | ```r 42 | library(carbonace) 43 | ``` 44 | 45 | ```{r} 46 | carbonace() 47 | ``` 48 | 49 | 50 | 51 | ```r 52 | init <- "family <- c('Baby','Mommy','Daddy','Grandma','Lets go hunt') 53 | 54 | for(f in family){ 55 | if(grepl('hunt',f)){ 56 | print(sprintf('%s!',f)) 57 | }else{ 58 | print(sprintf('%s shark doo doo doo doo!',f)) 59 | } 60 | } 61 | 62 | # [1] 'Baby shark doo doo doo doo!' 63 | # [1] 'Mommy shark doo doo doo doo!' 64 | # [1] 'Daddy shark doo doo doo doo!' 65 | # [1] 'Grandma shark doo doo doo doo!' 66 | # [1] 'Lets go hunt!'" 67 | 68 | carbonace(init = init) 69 | ``` 70 | 71 | 72 | 73 | Changing the mode (language) 74 | 75 | 76 | 77 | Changing the theme 78 | 79 | 80 | -------------------------------------------------------------------------------- /R/carbonace.R: -------------------------------------------------------------------------------- 1 | #' @title carbonace shinyapp 2 | #' @description shinyapp to convert shinyAce to images for code sharing 3 | #' @param init character, intial script to initialize shinyAce with. 4 | #' @param viewer which [viewer][shiny::viewer] to open the app in. Default: shiny::paneViewer() 5 | #' @param ace_opts user specific settings tp pass to the [aceEditor][shinyAce::aceEditor]. 6 | #' Default: [ace_settings()][ace_settings] 7 | #' @return NULL 8 | #' @details 9 | #' 10 | #' - The app has an RStudio addin, which you can highlight text in the editor 11 | #' and the app will initialize with the contents. 12 | #' 13 | #' - use [ace_settings()][ace_settings] to set user specific values for the editor. 14 | #' 15 | #' Default options are: 16 | #' 17 | #' | **Field** | **Value** | 18 | #' | --- | --- | 19 | #' | theme | "ambience" | 20 | #' | mode | 'r' | 21 | #' | fontSize | 12 | 22 | #' | tabSize | 4 | 23 | #' | value | init | 24 | #' | wordWrap | TRUE | 25 | #' | autoScrollEditorIntoView | TRUE | 26 | #' | maxLines | Inf | 27 | #' | placeholder | "Show a placeholder when the editor is empty ..." | 28 | #' 29 | #' @examples 30 | #' if(interactive()){ 31 | #' carbonace:::carbonace() 32 | #' 33 | #' # Use ace_settings to change initial theme 34 | #' # carbonace:::carbonace(ace_opts = ace_settings(theme = 'chrome')) 35 | #' } 36 | #' @rdname carbonace 37 | #' @export 38 | #' @import snapper 39 | #' @import shiny 40 | #' @importFrom shinyAce updateAceEditor getAceModes getAceThemes aceEditor 41 | #' @importFrom shinyjqui jqui_resizable 42 | carbonace <- function(init = "x <- 1", viewer = shiny::paneViewer(), ace_opts = ace_settings()){ 43 | 44 | server <- function(input, output, session) { 45 | 46 | shiny::observe({ 47 | shinyAce::updateAceEditor( 48 | session, 49 | "ace", 50 | theme = input$theme, 51 | mode = input$mode, 52 | tabSize = input$tab_size, 53 | fontSize = input$font_size, 54 | useSoftTabs = as.logical(input$soft), 55 | showInvisibles = as.logical(input$invisible) 56 | ) 57 | }) 58 | 59 | shiny::observeEvent(input$reset, { 60 | shinyAce::updateAceEditor(session, "ace", value = init) 61 | }) 62 | 63 | shiny::observeEvent(input$clear, { 64 | shinyAce::updateAceEditor(session, "ace", value = "") 65 | }) 66 | } 67 | 68 | opts <- pkg_opts(init) 69 | 70 | if(length(ace_opts)>0){ 71 | 72 | for(i in names(ace_opts)){ 73 | opts[[i]] <- ace_opts[[i]] 74 | } 75 | 76 | } 77 | 78 | ace <- do.call(shinyAce::aceEditor,opts) 79 | 80 | # define UI for application that demonstrates a simple Ace editor 81 | ui <- shiny::pageWithSidebar( 82 | shiny::headerPanel(title = "Share your pretty shinyAce code!", 83 | windowTitle = 'carbonace'), 84 | shiny::sidebarPanel(id = 'side', 85 | snapper::load_snapper(), 86 | shiny::selectInput("mode", "Mode: ", choices = shinyAce::getAceModes(), selected = opts$mode), 87 | shiny::selectInput("theme", "Theme: ", choices = shinyAce::getAceThemes(), selected = opts$theme), 88 | shiny::numericInput("tab_size", "Tab size:", opts$tabSize), 89 | shiny::numericInput("font_size", "Font size:", opts$fontSize), 90 | shiny::radioButtons("soft", NULL, c("Soft tabs" = TRUE, "Hard tabs" = FALSE), inline = TRUE), 91 | shiny::radioButtons("invisible", NULL, c("Hide invisibles" = FALSE, "Show invisibles" = TRUE), inline = TRUE), 92 | shiny::actionButton("reset", "Reset text"), 93 | shiny::actionButton("clear", "Clear text"), 94 | snapper::preview_button(ui = '#ace',label = 'Preview Image'), 95 | snapper::download_button(ui = '#ace',label = 'Download Image') 96 | ), 97 | shiny::mainPanel( 98 | shinyjqui::jqui_resizable(ace), 99 | snapper::snapper_div() 100 | ) 101 | ) 102 | 103 | shiny::runGadget(ui, server, viewer = viewer) 104 | 105 | } 106 | -------------------------------------------------------------------------------- /R/settings.R: -------------------------------------------------------------------------------- 1 | #' @title Set components of aceEditor settings 2 | #' @description Customize non-data components of the the editor. 3 | #' @return list of class c('ace_settings') 4 | #' @details To find further information on the attributes that can be used 5 | #' please refer to [shinyAce](https://github.com/trestletech/shinyAce) 6 | #' @rdname ace_settings 7 | #' @inheritParams shinyAce::aceEditor 8 | #' @param \dots not used 9 | #' @export 10 | ace_settings <- function(value, 11 | mode, 12 | theme, 13 | vimKeyBinding, 14 | readOnly, 15 | height, 16 | fontSize, 17 | debounce, 18 | wordWrap, 19 | showLineNumbers, 20 | highlightActiveLine, 21 | selectionId, 22 | cursorId, 23 | hotkeys, 24 | code_hotkeys, 25 | autoComplete, 26 | autoCompleters, 27 | autoCompleteList, 28 | tabSize, 29 | useSoftTabs, 30 | showInvisibles, 31 | setBehavioursEnabled, 32 | autoScrollEditorIntoView, 33 | maxLines, 34 | minLines, 35 | placeholder, 36 | ...){ 37 | 38 | setting <- find_args(...) 39 | 40 | bad_name <- setdiff(names(setting),names(default_class)) 41 | 42 | if(length(bad_name)>0) 43 | stop(sprintf('%s not a valid element',paste0(bad_name,collapse = ', '))) 44 | 45 | invisible(lapply(names(setting),check_setting,setting)) 46 | 47 | structure(setting, class = c("ace_settings")) 48 | 49 | } 50 | 51 | find_args <- function (...) { 52 | env <- parent.frame() 53 | args <- names(formals(sys.function(sys.parent(1)))) 54 | vals <- mget(args, envir = env) 55 | vals <- vals[!vapply(vals, is_missing_arg, logical(1))] 56 | utils::modifyList(vals, list(..., ... = NULL)) 57 | } 58 | 59 | is_missing_arg <- function (x) identical(x, quote(expr = )) 60 | 61 | check_setting <- function(e,elements){ 62 | e_val <- elements[[e]] 63 | if(!inherits(e_val,default_class[e])) 64 | stop(sprintf('%s must be of class %s',e,default_class[e])) 65 | } 66 | 67 | default_class <- c( 68 | 'value' = 'character', 69 | 'mode' = 'character', 70 | 'theme' = 'character', 71 | 'vimKeyBinding' = 'logical', 72 | 'readOnly' = 'logical', 73 | 'height' = 'character', 74 | 'fontSize' = 'numeric', 75 | 'debounce' = 'numeric', 76 | 'wordWrap' = 'logical', 77 | 'showLineNumbers' = 'logical', 78 | 'highlightActiveLine' = 'logical', 79 | 'selectionId' = 'character', 80 | 'cursorId' = 'character', 81 | 'hotkeys' = 'list', 82 | 'code_hotkeys' = 'list', 83 | 'autoComplete' = 'character', 84 | 'autoCompleters' = 'character', 85 | 'autoCompleteList' = 'list', 86 | 'tabSize' = 'numeric', 87 | 'useSoftTabs' = 'logical', 88 | 'showInvisibles' = 'logical', 89 | 'setBehavioursEnabled' = 'logical', 90 | 'autoScrollEditorIntoView' = 'logical', 91 | 'maxLines' = 'numeric', 92 | 'minLines' = 'numeric', 93 | 'placeholder' = 'character' 94 | ) 95 | 96 | pkg_opts <- function(init){ 97 | list( 98 | outputId = "ace", 99 | selectionId = "selection", 100 | theme = "ambience", 101 | mode = 'r', 102 | fontSize = 12, 103 | tabSize = 4, 104 | value = init, 105 | wordWrap = TRUE, 106 | autoScrollEditorIntoView = TRUE, 107 | maxLines = Inf, 108 | placeholder = "Show a placeholder when the editor is empty ..." 109 | ) 110 | } 111 | -------------------------------------------------------------------------------- /man/ace_settings.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/settings.R 3 | \name{ace_settings} 4 | \alias{ace_settings} 5 | \title{Set components of aceEditor settings} 6 | \usage{ 7 | ace_settings( 8 | value, 9 | mode, 10 | theme, 11 | vimKeyBinding, 12 | readOnly, 13 | height, 14 | fontSize, 15 | debounce, 16 | wordWrap, 17 | showLineNumbers, 18 | highlightActiveLine, 19 | selectionId, 20 | cursorId, 21 | hotkeys, 22 | code_hotkeys, 23 | autoComplete, 24 | autoCompleters, 25 | autoCompleteList, 26 | tabSize, 27 | useSoftTabs, 28 | showInvisibles, 29 | setBehavioursEnabled, 30 | autoScrollEditorIntoView, 31 | maxLines, 32 | minLines, 33 | placeholder, 34 | ... 35 | ) 36 | } 37 | \arguments{ 38 | \item{value}{The initial text to be contained in the editor.} 39 | 40 | \item{mode}{The Ace \code{mode} to be used by the editor. The \code{mode} 41 | in Ace is often the programming or markup language that you're using and 42 | determines things like syntax highlighting and code folding. Use the 43 | \code{\link[shinyAce]{getAceModes}} function to enumerate all the modes available.} 44 | 45 | \item{theme}{The Ace \code{theme} to be used by the editor. The \code{theme} 46 | in Ace determines the styling and coloring of the editor. Use 47 | \code{\link[shinyAce]{getAceThemes}} to enumerate all the themes available.} 48 | 49 | \item{vimKeyBinding}{If set to \code{TRUE}, Ace will enable vim-keybindings. 50 | Default value is \code{FALSE}.} 51 | 52 | \item{readOnly}{If set to \code{TRUE}, Ace will disable client-side editing. 53 | If \code{FALSE} (the default), it will enable editing.} 54 | 55 | \item{height}{A number (which will be interpreted as a number of pixels) or 56 | any valid CSS dimension (such as "\code{50\%}", "\code{200px}", or 57 | "\code{auto}").} 58 | 59 | \item{fontSize}{Defines the font size (in px) used in the editor and should 60 | be an integer. The default is 12.} 61 | 62 | \item{debounce}{The number of milliseconds to debounce the input. This will 63 | cause the client to withhold update notifications until the user has 64 | stopped typing for this amount of time. If 0, the server will be notified 65 | of every keystroke as it happens.} 66 | 67 | \item{wordWrap}{If set to \code{TRUE}, Ace will enable word wrapping. 68 | Default value is \code{FALSE}.} 69 | 70 | \item{showLineNumbers}{If set to \code{TRUE}, Ace will show line numbers.} 71 | 72 | \item{highlightActiveLine}{If set to \code{TRUE}, Ace will highlight the active 73 | line.} 74 | 75 | \item{selectionId}{The ID associated with a change of selected text} 76 | 77 | \item{cursorId}{The ID associated with a cursor change.} 78 | 79 | \item{hotkeys}{A list whose names are ID names and whose elements are the 80 | shortcuts of keys. Shortcuts can either be a simple string or a list with 81 | elements 'win' and 'mac' that that specifies different shortcuts for win and 82 | mac (see example 05).} 83 | 84 | \item{code_hotkeys}{A nested list. The first element indicates the code type (e.g., "r") 85 | The second element is a list whose names are ID names and whose elements are the 86 | shortcuts of keys (see \code{hotkeys})} 87 | 88 | \item{autoComplete}{Enable/Disable auto code completion. Must be one of the following: 89 | \describe{ 90 | \item{\code{"disabled"}}{Disable Code Autocomplete} 91 | \item{\code{"enabled"}}{Enable Basic Code Autocomplete. Autocomplete can be 92 | triggered using Ctrl-Space, Ctrl-Shift-Space, or Alt-Space.} 93 | \item{\code{"live"}}{Enable Live Code Autocomplete. In addition to Basic 94 | Autocomplete, it will automatically trigger at each key stroke.} 95 | } 96 | By default, only local completer is used where all aforementioned code pieces 97 | will be considered as candidates. Use \code{autoCompleteList} for static 98 | completions and \code{\link[shinyAce]{aceAutocomplete}} for dynamic R code completions.} 99 | 100 | \item{autoCompleters}{Character vector of completers to enable. If set to \code{NULL}, 101 | all completers will be disabled. Select one or more of "snippet", "text", "static", 102 | "keyword", and "rlang" to control which completers to use. Default option is to 103 | use the "snippet", "text", and "keyword" autocompleters} 104 | 105 | \item{autoCompleteList}{A named list that contains static code completions 106 | candidates. This can be especially useful for Non-Standard Evaluation (NSE) 107 | functions such as those in \code{dplyr} and \code{ggvis}. Each element in list 108 | should be a character array whose words will be listed under the element key. 109 | For example, to suggests column names from \code{mtcars} and \code{airquality}, 110 | you can use \code{list(mtcars = colnames(mtcars), airquality = colnames(airquality))}.} 111 | 112 | \item{tabSize}{Set tab size. Default value is 4} 113 | 114 | \item{useSoftTabs}{Replace tabs by spaces. Default value is TRUE} 115 | 116 | \item{showInvisibles}{Show invisible characters (e.g., spaces, tabs, newline characters). 117 | Default value is FALSE} 118 | 119 | \item{setBehavioursEnabled}{Determines if the auto-pairing of special characters, like 120 | quotation marks, parenthesis, or brackets should be enabled. Default value is TRUE.} 121 | 122 | \item{autoScrollEditorIntoView}{If TRUE, expands the size of the editor window as new lines are added} 123 | 124 | \item{maxLines}{Maximum number of lines the editor window will expand to when autoScrollEditorIntoView is TRUE} 125 | 126 | \item{minLines}{Minimum number of lines in the editor window when autoScrollEditorIntoView is TRUE} 127 | 128 | \item{placeholder}{A string to use a placeholder when the editor has no content} 129 | 130 | \item{\dots}{not used} 131 | } 132 | \value{ 133 | list of class c('ace_settings') 134 | } 135 | \description{ 136 | Customize non-data components of the the editor. 137 | } 138 | \details{ 139 | To find further information on the attributes that can be used 140 | please refer to \href{https://github.com/trestletech/shinyAce}{shinyAce} 141 | } 142 | --------------------------------------------------------------------------------