- editor_instance = dom: wheic_parser.parse(el.value, parser_opts)
- # el.value = dom_to_html dom
+ editor_instance = {
+ dom: wheic_parser.parse el.value, parser_opts
+ iframe: document.createElement('iframe')
+ load_html: (html) ->
+ @dom = wheic_parser.parse el.value, parser_opts
+ }
+ idoc = editor_instance.iframe.contentDocument
+ if options.stylesheet # TODO test this
+ istyle = idoc.createElement 'style'
+ istyle.setAttribute 'src', options.stylesheet
+ idoc.head.appendChild istyle
+ el.parentNode.appendChild editor_instance.iframe