Sha256: 3124c28f5eb1b1ab5302726d221c5323346dca53b3607fd4c14447724bcf361f

Contents?: true

Size: 887 Bytes

Versions: 1271

Compression:

Stored size: 887 Bytes

Contents

<%= pb_rails("rich_text_editor", props: { id: "content-preview-editor" }) %>
<div id="card-obfuscation" style="display:none">
  <%= pb_rails("card", props: { margin_top: "md" }) do %>
   <div id="content-preview" class="trix-content">
   </div>
  <% end %>
</div>
<%= pb_rails("button", props: { id: "preview-button", variant: "secondary", margin_top: "md" }) do %>
  <span>Preview Output</span>
<% end %>

<script>
  // Button event handler
  const button = document.getElementById('preview-button');
  button.addEventListener('click', function() {
    const content = document.getElementById('content-preview-editor');
    const previewArea = document.getElementById('content-preview');
    const cardDiv = document.getElementById('card-obfuscation');

    previewArea.innerHTML = content.value;
    cardDiv.classList.add('mt_md');
    cardDiv.style.display = 'block';
  });
</script>

Version data entries

1,271 entries across 1,271 versions & 2 rubygems

Version Path
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.16.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.15.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.14.1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.13.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.12.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.11.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.10.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.9.0.alpha.inline1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.9.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.8.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.7.0.pre.alphawidth1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-9.7.0.pre.alpha.a11y.btn app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb