Govspeak Editor example

With data attributes

How it looks (preview)

Generating preview, please wait.

There is an error in your Markdown. Select Back to edit and review your markdown.

How to call this example

<%= render "components/govspeak_editor", {
  label: {
    text: "Document content body",
    bold: true
  },
  name: "with_data_attributes",
  data_attributes: {
    some_attribute: "This is for the main component"
  },
  textarea_data_attributes: {
    some_attribute: "This is for the textarea"
  },
  preview_button_data_attributes: {
    some_attribute: "This is for the toggle preview button"
  }
} %>