josdejong / josdejong/jsoneditor

Missing documentation on how to create new modes/plugin for jsoneditor?

Open
#336 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

I was searching for the documentation to create new modes for jsoneditor, as I want to use codemirror instead of ace editor. Is this the minimal structure required to create new modes/plugin for jsoneditor?
```
var newMode = (function () {
var NewMode = {};
NewMode.create = function(container, options) {};
NewMode.destroy = function () {};
NewMode.set = function (json. name) {};
NewMode.get = function () {};
return {
mode: 'newMode',
mixin: NewMode,
data: 'json'
};
}());
JSONEditor.registerMode(newMode);
```
May be this question doesn't belong under under `Issues`, but I wasn't sure where else to post.
Keep up the good work!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.