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