Skip to content

Jsoneditor code mode requires worker-json.js from the absoute path not from the relative #87

Closed
@smartameer

Description

@smartameer

Hi,
I was using json-editor in "code" mode which is requiring worker-json.js
I have my scripts folder from where ace.min.js is loading, but it requires worker-json.js which is also in scripts directory, but dom error says that it's being requested from absolute url instead of scripts directory. May i know why this worker-json is required when https://github.com/josdejong/jsoneditor/blob/master/examples/03_switch_mode.html says no need of worker-json.js for code mode.

My Script block is

        var classContainer = document.getElementById('puppetClassEditor');
        var classOptions = { modes: ['code', 'tree'],
            search: false
        };
        $scope.classEditor = new jsoneditor.JSONEditor(classContainer, classOptions);
        $scope.classEditor.container.style.height = '150px';

        var paramContainer = document.getElementById('puppetParametersEditor');
        var paramOptions = { modes: ['code', 'tree'],
            search: false
        };
        $scope.paramEditor = new jsoneditor.JSONEditor(paramContainer, paramOptions);
        $scope.paramEditor.container.style.height = '150px';

I am using angularjs above this editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions