You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The (onInit) output of the EditorComponent wants a method with a parameter of type EventObj<any>, however the EventObj interface is not exported and can't be imported.
Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.
import { EventObj } from '@tinymce/tinymce-angular/editor/Events';
What is the expected behavior?
Allow us to import that Interface for correct method parameters
Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular?
Using tinymce-angular 9.1.0, Angular 20.1.4 and TypeScript 5.8.0
This worked with Angular 19 and TypeScript 5.5.4
@heggiG That is odd. I can see that the bundle exports EventObj and can be imported in this project (after I updated the Angular and TypeScript versions to match yours). What could be the differences?
@tiny-ben-tran the problem is likely, that this repo uses typescript 5.4 instead of 5.8 as needed by angular 20. Likely the Compiler just didn't care that we imported that type, but does now.
@tiny-ben-tran sorry for the delay, I have created this repo which reproduces the error. In main.ts I try importing EventObj and get a TypeScript error.
@heggiG the difference between the two repos is how Typescript is configured. Setting moduleResolution: "node" should allow you to import EventObj from @tinymce/tinymce-angular/editor/Events.
Re your PR #429 , you will need to sign a CLA for us to accept it.
Hi @tiny-ben-tran, can you explain technically why using the newer moduleResolution: "bundler" stops the EventObj import working from @tinymce/tinymce-angular/editor/Events? I've seen this a few times over different libraries and I just wondered why this change to the module resolution causes this problem.
@nudge-alec-robertson , as far as I understand it is to tell how Typescript resolves modules and their type definitions. It is hard to say without seeing a complete typescript config, as moduleResolution works hand in hand with the module option. FYI it is worth reading modules theory
Activity
tiny-ben-tran commentedon Sep 1, 2025
@heggiG That is odd. I can see that the bundle exports
EventObjand can be imported in this project (after I updated the Angular and TypeScript versions to match yours). What could be the differences?heggiG commentedon Sep 2, 2025
@tiny-ben-tran the problem is likely, that this repo uses typescript 5.4 instead of 5.8 as needed by angular 20. Likely the Compiler just didn't care that we imported that type, but does now.
tiny-ben-tran commentedon Sep 2, 2025
@heggiG can you provide a replication case on codesandbox.io?
heggiG commentedon Sep 6, 2025
I tried doing that, but I think sandbox doesn't work with angular 20. When I'm back from vacation I'll try to recreate in a minimal repo.
heggiG commentedon Sep 30, 2025
@tiny-ben-tran sorry for the delay, I have created this repo which reproduces the error. In
main.tsI try importingEventObjand get a TypeScript error.tiny-ben-tran commentedon Oct 14, 2025
@heggiG the difference between the two repos is how Typescript is configured. Setting
moduleResolution: "node"should allow you to importEventObjfrom@tinymce/tinymce-angular/editor/Events.Re your PR #429 , you will need to sign a CLA for us to accept it.
tiny-ben-tran commentedon Nov 2, 2025
@heggiG A new version has been released with your fix. Thanks for your contribution.
nudge-alec-robertson commentedon Dec 4, 2025
Hi @tiny-ben-tran, can you explain technically why using the newer
moduleResolution: "bundler"stops the EventObj import working from@tinymce/tinymce-angular/editor/Events? I've seen this a few times over different libraries and I just wondered why this change to the module resolution causes this problem.tiny-ben-tran commentedon Dec 18, 2025
@nudge-alec-robertson , as far as I understand it is to tell how Typescript resolves modules and their type definitions. It is hard to say without seeing a complete typescript config, as
moduleResolutionworks hand in hand with themoduleoption. FYI it is worth reading modules theory