diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml index 9de007724..9caf96509 100644 --- a/app/views/wiki/edit.rhtml +++ b/app/views/wiki/edit.rhtml @@ -6,7 +6,12 @@ <% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %> <%= error_messages_for 'content' %> -
<%= f.text_area :text, :cols => 100, :rows => 25, :style => "width:99%;" %>
+<%= f.text_area :text, :cols => 100, :rows => 25, :style => "width:99.5%;" %>
<%= f.text_field :comment, :size => 120 %>
<%= submit_tag l(:button_save) %> <%= link_to_remote l(:label_preview), diff --git a/config/help.yml b/config/help.yml index eb1c38c47..e67019d4f 100644 --- a/config/help.yml +++ b/config/help.yml @@ -73,4 +73,6 @@ pages: account: index: ch03.html lost_password: ch03s03.html - register: ch03s04.html \ No newline at end of file + register: ch03s04.html + wiki: + syntax: wiki_syntax.html \ No newline at end of file diff --git a/public/images/jstoolbar/bt_heading.png b/public/images/jstoolbar/bt_heading.png new file mode 100644 index 000000000..a143f23a7 Binary files /dev/null and b/public/images/jstoolbar/bt_heading.png differ diff --git a/public/javascripts/jstoolbar.js b/public/javascripts/jstoolbar.js index cf9454619..a381c3c20 100644 --- a/public/javascripts/jstoolbar.js +++ b/public/javascripts/jstoolbar.js @@ -346,13 +346,13 @@ jsToolBar.prototype.elements.del = { } // quote -//jsToolBar.prototype.elements.quote = { -// type: 'button', -// title: 'Inline quote', -// fn: { -// wiki: function() { this.singleTag('{{','}}') } -// } -//} +jsToolBar.prototype.elements.quote = { + type: 'button', + title: 'Inline quote', + fn: { + wiki: function() { this.singleTag('??') } + } +} // code jsToolBar.prototype.elements.code = { @@ -364,7 +364,21 @@ jsToolBar.prototype.elements.code = { } // spacer -//jsToolBar.prototype.elements.space1 = {type: 'space'} +jsToolBar.prototype.elements.space1 = {type: 'space'} + +// heading +jsToolBar.prototype.elements.heading = { + type: 'button', + title: 'Heading', + fn: { + wiki: function() { + this.encloseSelection('','',function(str) { + str = str.replace(/\r/g,''); + return 'h2. '+str.replace(/\n/g,"\n* "); + }); + } + } +} // br //jsToolBar.prototype.elements.br = { @@ -410,6 +424,7 @@ jsToolBar.prototype.elements.ol = { jsToolBar.prototype.elements.space3 = {type: 'space'} // link +/* jsToolBar.prototype.elements.link = { type: 'button', title: 'Link', @@ -438,3 +453,12 @@ jsToolBar.prototype.elements.link.fn.wiki = function() { this.encloseSelection(stag,etag); } }; +*/ +// link or wiki page +jsToolBar.prototype.elements.link = { + type: 'button', + title: 'Link', + fn: { + wiki: function() { this.encloseSelection("[[", "]]") } + } +} diff --git a/public/manual/en/wiki_syntax.html b/public/manual/en/wiki_syntax.html new file mode 100644 index 000000000..a71a39dbc --- /dev/null +++ b/public/manual/en/wiki_syntax.html @@ -0,0 +1,32 @@ + +
+ +Font Styles | ||
|---|---|---|
![]() | *Strong* | Strong |
![]() | _Italic_ | Italic |
![]() | +Underline+ | Underline |
![]() | -Deleted- | |
![]() | ??Quote?? | Quote |
![]() | @Code@ | Code |
Lists | ||
![]() | * Item 1 * Item 2 |
|
![]() | # Item 1 # Item 2 |
|
Titles | ||
![]() | h2. Title 2 | Title 2 |
Links | ||
![]() | [[Wiki page]] | Wiki page |
| Issue #12 | Issue #12 | |
| Revision r43 | Revision r43 | |
Mise en forme | ||
|---|---|---|
![]() | *Gras* | Gras |
![]() | _Italique_ | Italique |
![]() | +Souligné+ | Souligné |
![]() | -Rayé- | |
![]() | ??Citation?? | Citation |
![]() | @Code@ | Code |
Listes | ||
![]() | * Item 1 * Item 2 |
|
![]() | # Item 1 # Item 2 |
|
Titres | ||
![]() | h2. Titre 2 | Titre 2 |
Liens | ||
![]() | [[Page wiki]] | Page wiki |
| Demande #12 | Demande #12 | |
| Révision r43 | Révision r43 | |