Add preview functionality to rich text controls
This commit is contained in:
parent
b6163f0fc2
commit
561f2f694a
15 changed files with 191 additions and 8 deletions
|
@ -10,7 +10,7 @@
|
|||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="fieldName"><%= t 'diary_entry.edit.body' -%></td>
|
||||
<td><%= f.text_area :body, :cols => 80 %></td>
|
||||
<td><%= richtext_area :diary_entry, :body, :cols => 80 %></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="fieldName"><%= t 'diary_entry.edit.language' -%></td>
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
<%= error_messages_for 'diary_comment' %>
|
||||
|
||||
<%= form_for DiaryComment.new, :url => { :action => 'comment' } do |f| %>
|
||||
<%= f.text_area :body, :cols => 80, :rows => 5 %>
|
||||
<%= form_for :diary_comment, :url => { :action => 'comment' } do |f| %>
|
||||
<%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
|
||||
<br />
|
||||
<br />
|
||||
<%= submit_tag t('diary_entry.view.save_button') %>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="fieldName"><%= t'message.new.body' %></td>
|
||||
<td><%= f.text_area :body, :cols => 80, :value => @body %></td>
|
||||
<td><%= richtext_area :message, :body, :cols => 80, :value => @body %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
|
29
app/views/site/_markdown_help.html.erb
Normal file
29
app/views/site/_markdown_help.html.erb
Normal file
|
@ -0,0 +1,29 @@
|
|||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><%= t "site.markdown_help.title" %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><%= t "site.markdown_help.headings" %></th>
|
||||
<td># <%= t "site.markdown_help.heading" %><br />## <%= t "site.markdown_help.subheading" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t "site.markdown_help.unordered" %></th>
|
||||
<td>* <%= t "site.markdown_help.first" %><br />* <%= t "site.markdown_help.second" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t "site.markdown_help.ordered" %></th>
|
||||
<td>1. <%= t "site.markdown_help.first" %><br />2. <%= t "site.markdown_help.second" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t "site.markdown_help.link" %></th>
|
||||
<td>[<%= t "site.markdown_help.text" %>](<%= t "site.markdown_help.url" %>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t "site.markdown_help.image" %></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
<tr>
|
||||
<td class="fieldName"><%= t 'user.account.profile description' %></td>
|
||||
<td><%= f.text_area :description, :rows => '5', :cols => '60' %></td>
|
||||
<td><%= richtext_area :user, :description, :rows => '15', :cols => '80' %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<p>
|
||||
<%= f.label :reason, t('user_block.new.reason', :name => @this_user.display_name) %><br />
|
||||
<%= f.text_area :reason, :cols => 80, :rows => 5 %>
|
||||
<%= richtext_area :user_block, :reason, :cols => 80, :rows => 20 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag 'user_block_period', t('user_block.new.period') %><br />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue