SlateSerializer de- and serializer text and html to Slate document values in Ruby.
Add this line to your application's Gemfile:
gem 'slate_serializer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install slate_serializer
To convert between plain text and Slate document use:
$ SlateSerializer::Plain.serializer([...]) => text
$ SlateSerializer::Plain.deserializer(text) => [...]
To convert between html and Slate document use:
$ SlateSerializer::Html.deserializer(html) => [...]
Bug reports and pull requests are welcome on GitHub at https://github.com/wesleystam/slate_serializer.