]> git.openstreetmap.org Git - rails.git/blob - app/views/shared/_richtext_field.html.erb
Merge branch 'pull/5023'
[rails.git] / app / views / shared / _richtext_field.html.erb
1 <div id="<%= id %>_container" class="row richtext_container">
2   <div id="<%= id %>_content" class="col-sm-8 mb-3 mb-sm-0 richtext_content">
3     <ul class="nav nav-tabs mb-3" role="tablist">
4       <li class="nav-item">
5         <button type="button" class="nav-link active" data-bs-toggle="tab" data-bs-target="#<%= id %>_edit"><%= t(".edit") %></button>
6       </li>
7       <li class="nav-item">
8         <button type="button" class="nav-link richtext_dopreview" data-bs-toggle="tab" data-bs-target="#<%= id %>_preview"><%= t(".preview") %></button>
9       </li>
10     </ul>
11     <div class="tab-content">
12       <div id="<%= id %>_edit" class="tab-pane show active">
13         <%= builder.text_area(attribute, options.merge(:wrapper => false, "data-preview-url" => preview_url(:type => type))) %>
14       </div>
15       <div id="<%= id %>_preview" class="tab-pane richtext_preview richtext text-break"></div>
16     </div>
17   </div>
18   <div id="<%= id %>_help" class="col-sm-4 richtext_help">
19     <div class="card bg-body-tertiary h-100">
20       <div class="card-body">
21         <%= render :partial => "shared/#{type}_help" %>
22       </div>
23     </div>
24   </div>
25 </div>