json-editor
json-editor copied to clipboard
Problem with SCEditor and Object Properties
I have noticed a long-standing problem that adding an "Object Properties" property will cause SCEditor to no longer accept input.
Also, perhaps unrelated, I'm getting many errors on load after this line 437 of src/lib/SCEditor.js:
doc = getWysiwygDoc();
doc.open(); // doc is undefined
Root cause is SCEditor uses iframe and json-editor moves field DOM subtrees during object property change to accommodate property ordering. Content inside iframe is lost during the move due to iframe sandbox scoping constraint. A workaround is switching to summernote with my working fork based on pr #440, which contains some bugs perhaps due to relying on an older version of summernote api. Related discussion on so