Sha256: 0326c5a1a378b3e15e0cd4b2b17fee1e29597876f3e3005ce4fa8255fe48399e
Contents?: true
Size: 1.66 KB
Versions: 2
Compression:
Stored size: 1.66 KB
Contents
<h3>Kramdown Web Service / HTTP JSON(P) API</h3> <h4>Render Markdown</h4> <pre><code>GET /markdown </code></pre> <p> Input: </p> <ul> <li><b>text</b> - <em>Required</em> string - The markdown text to render</li> </ul> <ul> <li><b>to</b> - <em>Optional</em> string - The format to use e.g. html|latex</li> </ul> <p class='api'> Example (HTML): <code>GET <a href='view-source:<%= url("/markdown?text=Hello+World!") %>'> /markdown?<span class='params'>text=<em>Hello+World!</em></span> </a> </code> </p> <p> Response: </p> <pre><code>Status: 200 OK Content-Type: text/html <p>Hello World!<p> </code></pre> <p class='api'> Example (LaTeX): <code>GET <a href='view-source:<%= url("/markdown?text=Hello+World!&to=latex") %>'> /markdown?<span class='params'>text=<em>Hello+World!</em></span>&<span class='params'>to=latex</span> </a> </code> </p> <p> Response: </p> <pre><code>Status: 200 OK Content-Type: text/latex Hello World </code></pre> <h4>Render Markdown (Babelmark2-Style)</h4> <pre><code>GET /babelmark </code></pre> <p> Input: </p> <ul> <li><b>text</b> - <em>Required</em> string - The markdown text to render</li> </ul> <p class='api'>Example: <code>GET <a href='<%= url("/babelmark?text=Hello+World!") %>'> /babelmark?<span class='params'>text=<em>Hello+World!</em></span> </a> </code> </p> <p> Response: </p> <pre><code>Status: 200 OK Content-Type: application/json { 'name': 'kramdown', 'html': '<p>Hello World!<p>', 'version': '1.10.0' } </code></pre>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kramdown-service-1.0.0 | lib/kramdown/service/views/_service.erb |
kramdown-service-0.3.0 | lib/kramdown/service/views/_service.erb |