For example on the blog post show page.
This uses https://getbootstrap.com/docs/4.4/utilities/text/#word-break to break long URLs on the blog post show view.
tag.div(:id => "#{id}_container", :class => "richtext_container") do
output_buffer << tag.div(:id => "#{id}_content", :class => "richtext_content") do
output_buffer << text_area(object_name, method, options.merge("data-preview-url" => preview_url(:type => type)))
- output_buffer << tag.div("", :id => "#{id}_preview", :class => "richtext_preview richtext")
+ output_buffer << tag.div("", :id => "#{id}_preview", :class => "richtext_preview richtext text-break")
end
output_buffer << tag.div(:id => "#{id}_help", :class => "richtext_help") do
<% end %>
</p>
- <div class="richtext"><%= diary_comment.body.to_html %></div>
+ <div class="richtext text-break"><%= diary_comment.body.to_html %></div>
<% if can? :hidecomment, DiaryEntry %>
<span>
<% if diary_comment.visible? %>
</div>
- <div class="richtext" xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
+ <div class="richtext text-break" xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
<%= diary_entry.body.to_html %>
</div>
<tr class="<%= "deemphasize" unless comment.visible? %>">
<td width="25%"><%= link_to comment.diary_entry.title, diary_entry_path(comment.diary_entry.user, comment.diary_entry) %></td>
<td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= time_ago_in_words(comment.created_at, :scope => :'datetime.distance_in_words_ago') %></span></td>
- <td width="50%" class="richtext"><%= comment.body.to_html %></td>
+ <td width="50%" class="richtext text-break"><%= comment.body.to_html %></td>
</tr>
<% end -%>
</table>
</div>
</div>
- <div class="richtext"><%= @message.body.to_html %></div>
+ <div class="richtext text-break"><%= @message.body.to_html %></div>
<div>
<%= link_to t(".back"), outbox_messages_path, :class => "btn btn-link" %>
<b><%= t ".user" %></b>
<%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %>
</p>
-<div class="richtext">
+<div class="richtext text-break">
<b><%= t ".description" %></b>
<%= @redaction.description.to_html %>
</div>
<div id="<%= id %>_container" class="form-row richtext_container">
<div id="<%= id %>_content" class="col-sm-8 mb-3 richtext_content">
<%= builder.text_area(attribute, options.merge(:wrapper => false, "data-preview-url" => preview_url(:type => type))) %>
- <div id="<%= id %>_preview" class="richtext_preview richtext"></div>
+ <div id="<%= id %>_preview" class="richtext_preview richtext text-break"></div>
</div>
<div id="<%= id %>_help" class="col-sm-4 richtext_help">
<div class="card bg-light">
<p><b><%= t ".status" %></b>: <%= block_status(@user_block) %></p>
<p><b><%= t ".reason" %></b></p>
-<div class="richtext"><%= @user_block.reason.to_html %></div>
+<div class="richtext text-break"><%= @user_block.reason.to_html %></div>
:date => l(user.creation_time, :format => :friendly) %>
<% end %>
</p>
- <div class="richtext"><%= user.description.to_html %></div>
+ <div class="richtext text-break"><%= user.description.to_html %></div>
</td>
<td>
<%= check_box_tag "user_#{user.id}", "", false, :name => "user[#{user.id}]" %>
</p>
</div>
- <div class="user-description richtext"><%= @user.description.to_html %></div>
+ <div class="user-description richtext text-break"><%= @user.description.to_html %></div>
</div>