-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Documentation/Tutorial for Creating a Custom Editor #6
Comments
+1 |
I've started filling out the wiki (https://github.com/jdorn/json-editor/wiki) with more in-depth documentation. I haven't documented custom editors yet, but the notes on overall code structure may still be helpful. |
+1 I update the I have noticed in default editors code that you often use this portion of code: this.jsoneditor.notifyWatchers(this.path);
if(this.parent) this.parent.onChildEditorChange(this);
else this.jsoneditor.onChange(); So I tried it and it worked. The problem is that if my schema has an array with the I don't know if I explained my problem correctly, but my final question is: [TL:DR] How to update a custom editor's value correctly ? Edit: I replaced the problematic code above with if(this.jsoneditor) {
this.jsoneditor.notifyWatchers(this.path);
if(this.parent) this.parent.onChildEditorChange(this);
else this.jsoneditor.onChange();
} and it seems to work fine now. |
@SebT thank you so much!!! |
I started documenting the editor class in the wiki - https://github.com/jdorn/json-editor/wiki#editor-srceditorjs The solution @SebT has is slightly out of date. It should be replaced with just |
…selector-reset Prevent dynamic select values being changed on initial load.
* LV: Moved examples -> docs * LV: Moved demo -> docs. Pulling JS from unpkg vs dist folder (dist eventually doesn't really need to be in github)
No description provided.
The text was updated successfully, but these errors were encountered: