Sha256: dab231270f9c88e2336a52989ea8eeaa756346e67613da9587fdaa7c8f500814

Contents?: true

Size: 855 Bytes

Versions: 948

Compression:

Stored size: 855 Bytes

Contents

import React, { useState } from 'react'
import { RichTextEditor, Select } from 'playbook-ui'
import { changelog, release } from './templates.js'

const RichTextEditorTemplates = (props) => {
  const [editorContent, setEditorContent] = useState('')

  const handleChange = (event) => {
    setEditorContent(event.target.value)
  }

  const options = [
    {
      value: release,
      text: 'Playbook Release',
    },
    {
      value: changelog,
      text: 'Changelog',
    },
  ]

  return (
    <div>
      <Select
          blankSelection="Select a template..."
          label="Template"
          onChange={handleChange}
          options={options}
          {...props}
      />
      <RichTextEditor
          id="template"
          template={editorContent}
          {...props}
      />
    </div>
  )
}

export default RichTextEditorTemplates

Version data entries

948 entries across 948 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui_docs-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx