Note that there are some explanatory texts on larger screens.

plurals
  1. POExtending MaRuKu to generate raw html tags, md_html escapes html
    text
    copied!<p>I'm working in the Insitiki code and trying to extend the maruku syntax to generate some custom html tags.</p> <p>Example:</p> <pre><code>|youtube 0FWPr6u8YF | </code></pre> <p>Should print the html code as follows:</p> <pre><code>&lt;object data='http://www.youtube.com/v/01hcB2zmMqM' style='width:425px; height:350px;' type='application/x-shockwave-flash'&gt;&lt;param name='movie' value='http://www.youtube.com/v/01hcB2zmMqM'/&gt;&lt;/object&gt; </code></pre> <p>Thus giving me a youtube embbeded video.</p> <p>To make it work I followed this tutorial <a href="http://maruku.rubyforge.org/extending/extensions.html" rel="nofollow noreferrer">http://maruku.rubyforge.org/extending/extensions.html</a> and looked at maruku documentation. </p> <p>THE PROBLEM is, using the maruku method:</p> <p><code>context.push(doc.md_html("&lt;p&gt;raw html&lt;/p&gt;"))</code> </p> <p>The resulting html code is escaped, so what I get is verbatim text and not the raw html that I wanted.</p> <p>I tried changing the strategy and using something like:</p> <p><code>context.push(doc.md_el(:raw_html,[],:raw_html =&gt; "&lt;p&gt; raw raw raw &lt;/p&gt;")</code></p> <p>To no use ... what I get now is: <code>REXML could not parse this XML/HTML:</code></p> <p>Found nothing on this issue, the maruku docs are really thin (or I'm really bad at searching)... this guy seems to have a similar problem <a href="https://stackoverflow.com/questions/1973717/textile-and-maruku-problem">textile and maruku problem</a></p> <p>Any help is appreciated.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload