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-7.14.0.pre.alpha1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.16.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.15.1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.15.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.14.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.13.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.12.1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.12.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.11.1 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
playbook_ui-7.11.0 app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb