Fixed rendering, added a Mixed option (Textile + Markdown), default is Textile-only
This commit is contained in:
parent
1c40b5e570
commit
b3aefba07a
|
@ -1,9 +1,8 @@
|
|||
* 0.10.0:
|
||||
Ported to ActionPack
|
||||
RedCloth 3.0.3
|
||||
BlueCloth is phased out
|
||||
Default markup remains Textile-only, but Markdown wikis now understand Textile
|
||||
syntax on the same page
|
||||
BlueCloth is phased out, Markdown is rendered by RedCloth
|
||||
Mix markup option understands both Textile and Markdown on the same page
|
||||
Instiki can serve static content (such as HTML or plain-text files) from ./public
|
||||
directory
|
||||
Much friendlier admin interface
|
||||
|
|
|
@ -27,11 +27,17 @@ module Engines
|
|||
|
||||
class Textile < AbstractEngine
|
||||
def mask
|
||||
RedCloth.new(@content, @content.options[:engine_opts]).to_html([:textile])
|
||||
RedCloth.new(@content, @content.options[:engine_opts]).to_html(:textile)
|
||||
end
|
||||
end
|
||||
|
||||
class Markdown < AbstractEngine
|
||||
def mask
|
||||
RedCloth.new(@content, @content.options[:engine_opts]).to_html(:markdown)
|
||||
end
|
||||
end
|
||||
|
||||
class Mixed < AbstractEngine
|
||||
def mask
|
||||
RedCloth.new(@content, @content.options[:engine_opts]).to_html
|
||||
end
|
||||
|
@ -43,6 +49,6 @@ module Engines
|
|||
end
|
||||
end
|
||||
|
||||
MAP = { :textile => Textile, :markdown => Markdown, :rdoc => RDoc }
|
||||
MAP = { :textile => Textile, :markdown => Markdown, :mixed => Mixed, :rdoc => RDoc, }
|
||||
MAP.default = Textile
|
||||
end
|
||||
|
|
|
@ -21,16 +21,16 @@
|
|||
<div class="inputBox, disableAutoComplete">
|
||||
Markup:
|
||||
<select name="markup">
|
||||
<%= html_options({"Textile" => :textile, "Markdown" => :markdown, "RDoc" => :rdoc },
|
||||
@web.markup) %>
|
||||
<%= html_options({'Textile' => :textile, 'Markdown' => :markdown, 'Mixed' => :mixed,
|
||||
'RDoc' => :rdoc }, @web.markup) %>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Color:
|
||||
<select name="color">
|
||||
<%= html_options({ "Green" => "008B26", "Purple" => "504685", "Red" => "DA0006",
|
||||
"Orange" => "FA6F00", "Grey" => "8BA2B0" }, @web.color) %>
|
||||
<%= html_options({ 'Green' => '008B26', 'Purple' => '504685', 'Red' => 'DA0006',
|
||||
'Orange' => 'FA6F00', 'Grey' => '8BA2B0' }, @web.color) %>
|
||||
</select>
|
||||
<br/>
|
||||
<p>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
|
||||
<h3>Markdown formatting tips (<a target="_new" href="http://daringfireball.net/projects/markdown/syntax">advanced</a>)</h3>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr><td>_your text_</td><td class="arrow">→</td><td><em>your text</em></td></tr>
|
||||
|
@ -11,6 +10,3 @@
|
|||
<tr><td><http://url><br /><email@add.com></td><td class="arrow">→</td><td>Auto-linked</td></tr>
|
||||
<tr><td>![Alt text](URL)</td><td class="arrow">→</td><td>Image</td></tr>
|
||||
</table>
|
||||
|
||||
<%= render 'wiki_words_help' %>
|
||||
</div>
|
|
@ -1,4 +1,3 @@
|
|||
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
|
||||
<h3>RDoc formatting tips (<a target="_new" href="http://rdoc.sourceforge.net/doc/files/markup/simple_markup_rb.html">advanced</a>)</h3>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr><td>_your text_</td><td class="arrow">→</td><td><em>your text</em></td></tr>
|
||||
|
@ -11,6 +10,3 @@
|
|||
<tr><td>http://url<br />mailto:e@add.com</td><td class="arrow">→</td><td>Auto-linked</td></tr>
|
||||
<tr><td>imageURL</td><td class="arrow">→</td><td>Image</td></tr>
|
||||
</table>
|
||||
|
||||
<%= render 'wiki_words_help' %>
|
||||
</div>
|
|
@ -1,4 +1,3 @@
|
|||
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
|
||||
<h3>Textile formatting tips (<a href="#" onClick="quickRedReference(); return false;">advanced</a>)</h3>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr><td>_your text_</td><td class="arrow">→</td><td><em>your text</em></td></tr>
|
||||
|
@ -12,9 +11,6 @@
|
|||
<tr><td>!imageURL!</td><td class="arrow">→</td><td>Image</td></tr>
|
||||
</table>
|
||||
|
||||
<%= render 'wiki_words_help' %>
|
||||
</div>
|
||||
|
||||
<script language="JavaScript">
|
||||
function quickRedReference() {
|
||||
window.open(
|
||||
|
|
|
@ -6,7 +6,11 @@
|
|||
|
||||
<%= "<p style='color:red'>Please correct the error that caused this error in rendering:<br/><small>#{@params["msg"]}</small></p>" if @params["msg"] %>
|
||||
|
||||
<%= render("#{@web.markup}_help") if @web %>
|
||||
<div id="MarkupHelp" style="float: right; width: 250px; margin-top: 5px">
|
||||
<%= render("#{@web.markup}_help") %>
|
||||
<%= render 'wiki_words_help' %>
|
||||
</div>
|
||||
|
||||
|
||||
<%= form_tag({ :action => 'save', :web => @web.address, :id => @page.name},
|
||||
{'id' => 'editForm', 'method' => 'post', 'onSubmit' => 'cleanAuthorName();'})
|
||||
|
|
Loading…
Reference in a new issue