ngx-schema-form icon indicating copy to clipboard operation
ngx-schema-form copied to clipboard

ng2sf-tinymce not working in Angular 6

Open nolafs opened this issue 7 years ago • 8 comments

Hi,

I am getting a compile error from ng2sf-tinymce.

ERROR in ./node_modules/ng2sf-tinymce/dist/index.js

Module not found: Error: Can't resolve 'angular2-schema-form'

Any idea why?

Thanks Olaf

nolafs avatar Jul 24 '18 10:07 nolafs

Unfortunately, ng2sf-tinymce is not upgraded to Angular 6.

ebrehault avatar Jul 24 '18 10:07 ebrehault

Thanks for letting me know.

Any suggestion or alternatives?

Appreciate the help.

nolafs avatar Jul 24 '18 10:07 nolafs

I am pretty sure the upgrade is not too difficult to do. Just replacing angular2-schema-form with ngx-schema-form might work directly.

ebrehault avatar Jul 24 '18 10:07 ebrehault

Ok, thanks

On 24 Jul 2018, at 11:45, Eric BREHAULT <[email protected]mailto:[email protected]> wrote:

I am pretty sure the upgrade is not too difficult to do. Just replacing angular2-schema-form with ngx-schema-form might work directly.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/makinacorpus/ngx-schema-form/issues/226#issuecomment-407363193, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIRkE1Oz5oNsKRMbSS7WlTddKtcTKsoEks5uJvrfgaJpZM4VceBs.

nolafs avatar Jul 24 '18 10:07 nolafs

Hi Eric,

I can confirm, that's all you need to do.

Cheers Olaf

nolafs avatar Jul 24 '18 11:07 nolafs

Excellent! Could you make a pull request?

ebrehault avatar Jul 24 '18 11:07 ebrehault

I actually notice an issue. The createEditor doesn't init the Tinymce after view init. I was able to fix it by adding setInterval in the createEditor.

this.zone.runOutsideAngular(()=> { this.check = setInterval(()=>{ tinymce.init(options) if(this.editor){ clearInterval(this.check); } },100) });

it feels hacked, any idea why?

nolafs avatar Jul 24 '18 13:07 nolafs

Well, if ngAfterViewInit is too soon, there is nothing else we can do I guess.

That's pretty surprising though, because the only reason we get an null editor is the target textarea does not existing in the DOM, and I really do not understand why it would not be there at ngAfterViewInit time…

ebrehault avatar Jul 24 '18 13:07 ebrehault