Markdown rendered to Respo DSL
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cli/build
entry
externs
polyfill/respo_md/comp
src/respo_md
.gitattributes
.gitignore
README.md
calcit.edn
deps.edn
meyvn.edn
package.json
shadow-cljs.edn
yarn.lock

README.md

Respo Markdown

Render Markdown subset to Respo DSL.

Demo http://repo.respo-mvc.org/markdown/

Supported features:

  • Code block
  • Headers, h1, h2, h3
  • Quoteblock
  • Unordered list
  • Inline code
  • Url
  • Inline link
  • Image link

Usage

Clojars Project

[respo/markdown "0.2.4"]
(respo-md.comp.md/comp-md-block "a\n" {})
; returns DSL
(respo-md.comp.md/comp-md "text inline")
; render inline DOM elements

For options {}, highlight.js is suggested:

{:highlight (fn [code lang]
   (let [result (.highlight hljs lang code)]
     (comment .log js/console "Result" result code lang js/hljs)
     (.-value result)))
 :style {}
 :css ".md-p {}"
 :class-name "demo"}

Write your own CSS to style the HTML:

.md-block {}

.md-span {}

.md-p {
  margin: 16px 0;
}

.md-code-block {
  color: white;
  background-color: hsl(300, 80%, 20%);
  padding: 8px;
  display: block;
  line-height: 1.5em;
}

Develop

Workflow https://github.com/mvc-works/calcit-workflow

License

MIT