https://github.com/superstructor/re-jsoneditor
Reagent wrapper for Jos De Jong's JSON Editor
https://github.com/superstructor/re-jsoneditor
clojurescript react reagent reagent-components ui-components
Last synced: 6 months ago
JSON representation
Reagent wrapper for Jos De Jong's JSON Editor
- Host: GitHub
- URL: https://github.com/superstructor/re-jsoneditor
- Owner: superstructor
- License: apache-2.0
- Created: 2021-02-25T08:57:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-31T00:55:05.000Z (over 4 years ago)
- Last Synced: 2025-05-19T13:19:26.259Z (7 months ago)
- Topics: clojurescript, react, reagent, reagent-components, ui-components
- Language: Clojure
- Homepage: https://superstructor.github.io/re-jsoneditor/
- Size: 610 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
:source-highlighter: coderay
:source-language: clojure
:toc:
:toc-placement: preamble
:sectlinks:
:sectanchors:
:toc:
:icons: font
image:https://img.shields.io/clojars/v/superstructor/re-jsoneditor?style=for-the-badge&logo=clojure&logoColor=fff["Clojars Project", link="https://clojars.org/superstructor/re-jsoneditor"]
image:https://img.shields.io/github/issues-raw/superstructor/re-jsoneditor?style=for-the-badge&logo=github["GitHub issues", link="https://github.com/superstructor/re-jsoneditor/issues"]
image:https://img.shields.io/github/license/superstructor/re-jsoneditor.svg?style=for-the-badge["License", link="https://github.com/superstructor/re-jsoneditor/blob/master/LICENSE"]
= Reagent wrapper for Jos de Jong's JSON Editor
A sophisticated Reagent wrapper around the link:https://github.com/josdejong/jsoneditor[`jsoneditor`] library.
== Quick Start
=== Step 1. Add Dependency
Add the following project dependency:
image:https://img.shields.io/clojars/v/superstructor/re-jsoneditor?style=for-the-badge&logo=clojure&logoColor=fff["Clojars Project", link="https://clojars.org/superstructor/re-jsoneditor"]
Requires that you have `reagent` and `re-com` as dependencies of your project:
image:https://img.shields.io/clojars/v/reagent?style=for-the-badge&logo=clojure&logoColor=fff["Clojars Project", link="https://clojars.org/reagent"] image:https://img.shields.io/clojars/v/re-com?style=for-the-badge&logo=clojure&logoColor=fff["Clojars Project", link="https://clojars.org/re-com"]
If you use shadow-cljs, the `jsoneditor` npm library dependency will be pulled automatically via `src/deps.cljs` `:npm-deps`.
If you use another build system, it is not currently supported so switch to shadow-cljs.
=== Step 2. Add Styles
Add JSON Editor stylesheet to your `index.html` or equivalent; e.g.:
https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.5.0/jsoneditor.css
=== Step 3. Use the Component
(ns my-app
(:require
[re-jsoneditor.core :refer [jsoneditor]]))
(defn panel
[]
[jsoneditor ...])
== Features
See link:https://superstructor.github.io/re-jsoneditor/[the demo].
== Outstanding Features
- ace and ajv customisation
- port JSON editor stylesheet to inline Garden
- `:schema` and `:schema-refs` arguments
- `:templates` argument
- `:auto-complete` argument
- `:on-text-selection-change` argument
- `:on-selection-change` argument
- `:on-event` argument
- `:on-focus` argument
- `:on-blur` argument
- `:color-picker?` argument
- `:timestamp-tag?` argument
- `:timestamp-format` argument
- `:language` argument
- `:languages` argument
- `:modal-anchor` argument
- `:popup-anchor` argument
- `:sort?` argument
- `:transform?` argument
- `:max-visible-children` argument
- `:create-query`, `:execute-query` and `:query-description` arguments
- `:theme` argument and auto-loading of ace themes etc.
== License
The Apache License Version 2.0
Copyright © 2018-2021 Isaac Johnston
Portions based on link:https://github.com/josdejong/jsoneditor[JSON Editor]
Copyright © Jos de Jong under the terms of the Apache License Version 2.0