tinymce / tinymce-angular

Official TinyMCE Angular Component
MIT License
320 stars 92 forks source link

Angular - declare tinymce init error #370

Closed ChoYeongHoon closed 4 months ago

ChoYeongHoon commented 6 months ago

version: 4.9.11

declare let tinymce: any;

ngOInit() void { ... tinymce.init({ selector: "#tinymce", menubar: true, toolbar: true }); ... }

I am using a Javascript library in the Angular environment. There is a problem creating an Editor through declare on the screen you want to use. If you go to route and go to another screen, the editor stops. The information you entered will disappear and you will not be able to enter new information.

Can you tell me what the phenomenon is? (I tried to apply it with npm install, but it did not install in the project I am working on, so I used declare)

exalate-issue-sync[bot] commented 5 months ago

Internal Ref: INT-3283

danoaky-tiny commented 5 months ago

It seems like you might not be using the @tinymce/tinymce-angular package? If that's the case, you'd be best off trying to use that instead as it will handle TinyMCE initialisation for you. It's an Angular specific wrapper for TinyMCE.

You can find a quick start guide here: https://www.tiny.cloud/docs/tinymce/6/angular-cloud/ You can also find the docs for the <editor> component here: https://www.tiny.cloud/docs/tinymce/6/angular-ref/

Let us know if that helps or if you have any other questions.