Sha256: 5bbe341021b8469d4ae84bf903135cbe46b67bc94f06a47b7b15450b29b266d2
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> html|latex string - The format to use</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-0.2.0 | lib/kramdown/service/views/_service.erb |
kramdown-service-0.1.0 | lib/kramdown/service/views/_service.erb |