fleshy-jsoneditor
Version:
LitElement custom element that wraps http://github.com/josdejong/jsoneditor based on https://github.com/Juicy/juicy-jsoneditor
106 lines (105 loc) • 4.41 kB
JSON
{
"version": "experimental",
"tags": [
{
"name": "fleshy-jsoneditor",
"path": "./fleshy-jsoneditor.js",
"description": "\n[](https://fleshy-jsoneditor.netlify.app)\n\nLitElement custom element that wraps [josdejong/jsoneditor](http://github.com/josdejong/jsoneditor).\n\nIt is an updated version of [juicy-jsoneditor](https://github.com/Juicy/juicy-jsoneditor)\n\nThis webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.\n\n## Demo\n\n[Check it live!](https://fleshy-jsoneditor.netlify.app/)\n\n## Installation\n```bash\nnpm i fleshy-jsoneditor\n```\n\n## Usage\n```html\n<script type=\"module\">\n import 'fleshy-jsoneditor/fleshy-jsoneditor.js';\n</script>\n\n<fleshy-jsoneditor></fleshy-jsoneditor>\n```",
"attributes": [
{
"name": "mode",
"description": "Set the editor mode. Available values: 'tree' (default), 'view', 'form', 'code', 'text', 'preview'.",
"type": "string"
},
{
"name": "name",
"description": "Initial field name for the root node",
"type": "string"
},
{
"name": "indentation",
"description": "Number of indentation spaces. 2 by default. Only applicable when mode is 'code', 'text', or 'preview'.",
"type": "number"
},
{
"name": "json",
"description": "Holds the json object to render in editor",
"type": "object",
"default": "{}"
},
{
"name": "modes",
"description": "Create a box in the editor menu where the user can switch between the specified modes",
"type": "array",
"default": "[]"
},
{
"name": "search",
"description": "Enables a search box in the upper right corner of the JSONEditor.\nOnly applicable when mode is 'tree', 'view', or 'form'.",
"type": "boolean",
"default": "false"
},
{
"name": "history",
"description": "Enables history, adds a button Undo and Redo to the menu of the JSONEditor.\nOnly applicable when mode is 'tree', 'form', or 'preview'",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "mode",
"attribute": "mode",
"description": "Set the editor mode. Available values: 'tree' (default), 'view', 'form', 'code', 'text', 'preview'.",
"type": "string"
},
{
"name": "name",
"attribute": "name",
"description": "Initial field name for the root node",
"type": "string"
},
{
"name": "indentation",
"attribute": "indentation",
"description": "Number of indentation spaces. 2 by default. Only applicable when mode is 'code', 'text', or 'preview'.",
"type": "number"
},
{
"name": "json",
"attribute": "json",
"description": "Holds the json object to render in editor",
"type": "object",
"default": "{}"
},
{
"name": "modes",
"attribute": "modes",
"description": "Create a box in the editor menu where the user can switch between the specified modes",
"type": "array",
"default": "[]"
},
{
"name": "search",
"attribute": "search",
"description": "Enables a search box in the upper right corner of the JSONEditor.\nOnly applicable when mode is 'tree', 'view', or 'form'.",
"type": "boolean",
"default": "false"
},
{
"name": "history",
"attribute": "history",
"description": "Enables history, adds a button Undo and Redo to the menu of the JSONEditor.\nOnly applicable when mode is 'tree', 'form', or 'preview'",
"type": "boolean",
"default": "false"
}
],
"events": [
{
"name": "change",
"description": "Event emitted when the json file is updated with the new json file and patches to applied over the original"
}
]
}
]
}