{"action":"created","issue":{"url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/202","repository_url":"https://api.github.com/repos/miztroh/wysiwyg-e","labels_url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/202/comments","events_url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/202/events","html_url":"https://github.com/miztroh/wysiwyg-e/issues/202","id":273067237,"number":202,"title":"Update editor value when inserting node through range0","user":{"login":"lastmjs","id":7000719,"avatar_url":"https://avatars2.githubusercontent.com/u/7000719?v=4","gravatar_id":"","url":"https://api.github.com/users/lastmjs","html_url":"https://github.com/lastmjs","followers_url":"https://api.github.com/users/lastmjs/followers","following_url":"https://api.github.com/users/lastmjs/following{/other_user}","gists_url":"https://api.github.com/users/lastmjs/gists{/gist_id}","starred_url":"https://api.github.com/users/lastmjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lastmjs/subscriptions","organizations_url":"https://api.github.com/users/lastmjs/orgs","repos_url":"https://api.github.com/users/lastmjs/repos","events_url":"https://api.github.com/users/lastmjs/events{/privacy}","received_events_url":"https://api.github.com/users/lastmjs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-10T21:35:36Z","updated_at":"2017-11-12T23:50:13Z","closed_at":null,"author_association":"NONE","body":"When I insert a node into the editor through the range API, the value property of the editor is not updated. This is causing me to have to go straight to the shadow root of the editor and grab the editable element and its innerHTML. This is fragile and it would be much preferred to keep the value property in sync:\r\n\r\nFor example:\r\n```\r\nconst textEditor = this.shadowRoot.querySelector('#textEditor');\r\nconst newTextNode = document.createTextNode('some text to add');\r\ntextEditor.range0.insertNode(newTextNode);\r\nconsole.log(textEditor.value); // this will not show the `some text to add`\r\n\r\nconst text = textEditor.shadowRoot.querySelector('#editable').innerHTML;\r\nconsole.log(text); // this will show the `some text to add`\r\n```"},"comment":{"url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/comments/343779059","html_url":"https://github.com/miztroh/wysiwyg-e/issues/202#issuecomment-343779059","issue_url":"https://api.github.com/repos/miztroh/wysiwyg-e/issues/202","id":343779059,"user":{"login":"miztroh","id":2515209,"avatar_url":"https://avatars1.githubusercontent.com/u/2515209?v=4","gravatar_id":"","url":"https://api.github.com/users/miztroh","html_url":"https://github.com/miztroh","followers_url":"https://api.github.com/users/miztroh/followers","following_url":"https://api.github.com/users/miztroh/following{/other_user}","gists_url":"https://api.github.com/users/miztroh/gists{/gist_id}","starred_url":"https://api.github.com/users/miztroh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miztroh/subscriptions","organizations_url":"https://api.github.com/users/miztroh/orgs","repos_url":"https://api.github.com/users/miztroh/repos","events_url":"https://api.github.com/users/miztroh/events{/privacy}","received_events_url":"https://api.github.com/users/miztroh/received_events","type":"User","site_admin":false},"created_at":"2017-11-12T23:50:13Z","updated_at":"2017-11-12T23:50:13Z","author_association":"OWNER","body":"I can't seem to replicate this issue in the master branch or the 3.0-preview branch.  Can you test this without ``wysiwyg-e`` being inside of shadow root and see if it makes a difference?\r\n\r\nhttps://raw-dot-custom-elements.appspot.com/miztroh/wysiwyg-e/v2.0.6/wysiwyg-e/demo/index.html"}}
{"actor":{"display_login":"miztroh"}}