<div id="<%= dom_id rich_text %>">
  <!-- Content Preview -->
  <div class="card mb-6">
    <div class="card-body">
      <div class="prose prose-sm max-w-none">
        <% if rich_text.plaintext? %>
          <%= rich_text.text %>
        <% else %>
          <%= sanitize(rich_text.text) %>
        <% end %>
      </div>
    </div>
  </div>

  <%= render "contents/show_details", content: rich_text do %>
    <!-- Render As Field -->
    <div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
      <dt class="text-body font-medium text-neutral-700">Render As:</dt>
      <dd class="text-body text-neutral-900 sm:col-span-2">
        <code class="px-2 py-1 bg-neutral-100 text-neutral-900 rounded text-caption font-mono">
          <%= rich_text.render_as %>
        </code>
      </dd>
    </div>
  <% end %>
</div>
