Skip to content

zeppelin/mobiledoc-renderer-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MobileDoc HTML Renderer for Elixir

(WIP)

Similarly to MobileDoc HTML Renderer, this an HTML renderer for the MobileDoc format used by the ContentKit editor, written in Elixir.

Installation

First, add MobileDoc to your mix.exs dependencies:

def deps do
  [{:mobiledoc, ">= 0.0.1"}]
end

Then, update your dependencies:

$ mix deps.get

Usage

mobiledoc = Poison.decode!(~s(
  {
    "version": "0.2.0",
    "sections": [
      [
        ["B"]
      ],
      [
        [1, "P", [
          [[0], 0, "hello world"]
        ]]
      ]
    ]
  }
))

rendered = MobileDoc.Renderer.render(mobiledoc)
# renders <div><p><b>hello world</b></b></div>

About

MobileDoc HTML Renderer for Elixir

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages