lib/draftjs_html.rb in draftjs_html-0.14.0 vs lib/draftjs_html.rb in draftjs_html-0.15.0
- old
+ new
@@ -2,13 +2,18 @@
require_relative "draftjs_html/version"
require 'nokogiri'
require_relative 'draftjs_html/draftjs'
require_relative 'draftjs_html/to_html'
+require_relative 'draftjs_html/from_html'
module DraftjsHtml
class Error < StandardError; end
def self.to_html(raw_draftjs, options: {})
ToHtml.new(options).convert(raw_draftjs)
+ end
+
+ def self.from_html(html_str, options: {})
+ FromHtml.new(options).convert(html_str)
end
end