{"action":"created","issue":{"url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/2698","repository_url":"https://api.github.com/repos/froala/wysiwyg-editor","labels_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/2698/labels{/name}","comments_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/2698/comments","events_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/2698/events","html_url":"https://github.com/froala/wysiwyg-editor/issues/2698","id":310080236,"number":2698,"title":"Reinitialize froala editor with new editor config","user":{"login":"loutocky","id":17061923,"avatar_url":"https://avatars0.githubusercontent.com/u/17061923?v=4","gravatar_id":"","url":"https://api.github.com/users/loutocky","html_url":"https://github.com/loutocky","followers_url":"https://api.github.com/users/loutocky/followers","following_url":"https://api.github.com/users/loutocky/following{/other_user}","gists_url":"https://api.github.com/users/loutocky/gists{/gist_id}","starred_url":"https://api.github.com/users/loutocky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loutocky/subscriptions","organizations_url":"https://api.github.com/users/loutocky/orgs","repos_url":"https://api.github.com/users/loutocky/repos","events_url":"https://api.github.com/users/loutocky/events{/privacy}","received_events_url":"https://api.github.com/users/loutocky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-30T14:31:00Z","updated_at":"2018-03-30T14:33:47Z","closed_at":"2018-03-30T14:33:47Z","author_association":"NONE","body":"I am not able to reinitialize froala editor with new config. I am using Angular 4 froala editor (version 2.7.6) directive from the examples of froala editor. This directive I wrapped into my own component:\r\n\r\n```\r\n  selector: 'froala-editor',\r\n  template: `<textarea [froalaEditor]=\"editorConfig\" (froalaModelChange)=\"onChange($event)\" [(froalaModel)]=\"HTMLData\"></textarea>`,\r\n  providers: [FROALA_EDITOR_VALUE_ACCESSOR],\r\n  styleUrls: ['./froala-editor.component.scss'],\r\n  changeDetection: ChangeDetectionStrategy.OnPush\r\n```\r\nThis Component has ngOnInit() method, where I am creating config with one event (froalaEditor.image.beforeUpload, converting image into base64). In the end, there is:\r\n\r\n`Object.assign(this.editorConfig, defaultConfig);`\r\n\r\nNow, it is working correctly, froala editor is created with my configuration. Now I want to implement autocomplete with At.js 3rd party plugin (it is already working if I have static data from the example of using At.js), but my data for autocomplete are Observable. So I need to call my backend, subscribe to it and when data arrive reinitialize editor with other new event 'froalaEditor.initialized' and set there data for autocomplete. So I need to update editorConfig and createEditor again with new other event. But froala editor is not able to respect and add initialized event. So autocomplete is not working."},"comment":{"url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/comments/377536959","html_url":"https://github.com/froala/wysiwyg-editor/issues/2698#issuecomment-377536959","issue_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/2698","id":377536959,"user":{"login":"stefanneculai","id":637004,"avatar_url":"https://avatars0.githubusercontent.com/u/637004?v=4","gravatar_id":"","url":"https://api.github.com/users/stefanneculai","html_url":"https://github.com/stefanneculai","followers_url":"https://api.github.com/users/stefanneculai/followers","following_url":"https://api.github.com/users/stefanneculai/following{/other_user}","gists_url":"https://api.github.com/users/stefanneculai/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanneculai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanneculai/subscriptions","organizations_url":"https://api.github.com/users/stefanneculai/orgs","repos_url":"https://api.github.com/users/stefanneculai/repos","events_url":"https://api.github.com/users/stefanneculai/events{/privacy}","received_events_url":"https://api.github.com/users/stefanneculai/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T14:33:47Z","updated_at":"2018-03-30T14:33:47Z","author_association":"OWNER","body":"@loutocky the editor config cannot be changed after the editor was initialized. If you would like to change it, the way to do it would be by destroying the editor instance and initializing it again. \r\n\r\nFor angular issues, please use the Angular repo instead. Thank you."}}
{"actor":{"display_login":"stefanneculai"}}