rcasto / adaptive-html

HTML to Adaptive Card JSON converter library
https://rcasto.github.io/adaptive-editor/
MIT License
12 stars 5 forks source link

ReferenceError: DOMParser is not defined while using toJson #7

Closed bijaykush closed 4 years ago

bijaykush commented 4 years ago

I am trying to convert html to adaptive json with as but getting error.

var json = adpativeHtml.toJSON("<p>Turn me into an Adaptive Card</p>");

Error: ReferenceError: DOMParser

@rcasto Any help on this?

rcasto commented 4 years ago

Not totes sure of your setup, but it should be working.

Below is a link to a CodePen that may be helpful: https://codepen.io/rcasto/pen/pojLYMJ?editors=0011