-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React support? #40
Comments
The link you posted returns 404...but yea it would be great to have an 'official' react component as part of this lib, id be willing to help contribute. |
Mozilla is also sponsoring a popular project: https://github.com/mozilla-services/react-jsonschema-form |
@loganvolkers Is the Mozilla lib a full replacement for json-editor? @narciero What would be needed to make this a react-component? |
|
Use |
This does ironically work in react development but not in production build. I use |
@crisu83 Can you shed some light on this? (since you're working a lot with react) |
@schmunk42 looking at the code it seems that this editor uses jQuery and DOM manipulation, and usually React doesn’t play very nice with DOM manipulation, so I’m not sure. |
@crisu83 Thank you for the feedback! |
@marc7000 Can you confirm it's supposed to work with Vue? I can partially see editor elements, but it's throwing the following error: UPDATE: Looks like it's actually initializing without errors, and only erroring when trying to call UPDATE 2: Never mind, turned out to be unrelated after all. :) |
I don't understand why info like this isn't added to the documentation or wiki? |
@Dids yes i can, i had a sample project, but i already deleted it. when i have time, i check it again and add it to the documentation. |
Hi, so where I can find, looks like Wiki page doesn't have article about this |
I decided to use this in my react code const JSONEditor = require("@json-editor/json-editor").JSONEditor; with my entire component looking like this (although it's rough and i'm likely to refactor it as i actually start to develop, but coding practices are not the point of this thread 😉) import React, {useEffect} from 'react';
import schema from "./schema.json"
import "@fortawesome/fontawesome-free/css/all.css"
const JSONEditor = require("@json-editor/json-editor").JSONEditor;
const BuildView = () => {
useEffect(() => {
const element = document.getElementById('editor_holder');
const editor = new JSONEditor(element, {
schema: schema,
display_required_only: true, // circular references will blow up without this
theme: 'bootstrap4',
iconlib: 'fontawesome5'
});
}, []);
return <div id='editor_holder'></div>
};
export default BuildView; |
Are there any plans to create a json-editor React.js component?
Thanks!
The text was updated successfully, but these errors were encountered: