Skip to contents

Create an interactive editor

Usage

editor(
  ...,
  getMarkdownOnChange = TRUE,
  getHTMLOnChange = TRUE,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

...

Options for the editor, see examples or online reference.

getMarkdownOnChange, getHTMLOnChange

Get editor's content in Shiny application through an input value : input$<outputId>_(markdown|html).

height, width

Height and width for the chart.

elementId

An optional id.

Value

An editor htmlwidget.

Examples

# Default is markdown editor with tab to switch to preview
editor()
# equivalent to editor(previewStyle = "tab")
# Show preview side by side editor(previewStyle = "vertical")
# Default edit type is markdown editor(initialEditType = "markdown")
# Change to wysiwyg and remove switch mode option editor(initialEditType = "wysiwyg", hideModeSwitch = TRUE)
# i18n : change language editor(language = "fr")
editor(language = "ar")
# see https://github.com/nhn/tui.editor/blob/master/docs/en/i18n.md for other supported languages