json-editor icon indicating copy to clipboard operation
json-editor copied to clipboard

Problem with SCEditor and Object Properties

Open brettz9 opened this issue 9 years ago • 1 comments

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

brettz9 avatar Aug 18 '16 00:08 brettz9

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

f-w avatar Nov 16 '17 18:11 f-w