jsoneditor icon indicating copy to clipboard operation
jsoneditor copied to clipboard

How to add jsoneditor to Stenciljs / Ionic app

Open TakhirMamirov opened this issue 4 years ago • 1 comments

I have a Stenciljs app with Ionic components. Whenever I try to import / use JSONEditor, it says:

import * as JSONEditor from 'jsoneditor';

var container = document.getElementById("jsoneditor");
        var options = {
            mode: 'tree'
        };
        console.log(JSONEditor)
        var editor = new JSONEditor(container, options);

TypeError: JSONEditor is not a constructor

How JSON Editor shall be used in my app?

TakhirMamirov avatar Oct 06 '20 11:10 TakhirMamirov

Did you try

import JSONEditor from 'jsoneditor';

?

josdejong avatar Oct 07 '20 06:10 josdejong