jdorn / json-editor

JSON Schema Based Editor
MIT License
5.8k stars 1.08k forks source link

SCEditor bug with Move down/up buttons or Property Add #745

Open jbmolle opened 7 years ago

jbmolle commented 7 years ago

Hi, I'm using the SCEditor plugin and when I click on Move up / down or Property Add buttons the texts in SCEditor disappear. If I switch the SCEditor to source code, I can see the sources. But the WYSIWYG text is blank. Best, JB

f-w commented 6 years ago

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