tinymce-react icon indicating copy to clipboard operation
tinymce-react copied to clipboard

tinymce as peerDependency

Open cdaringe opened this issue 3 years ago • 1 comments

What is the current behavior?

This library install TinyMCE all on its own.

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.

What is the expected behavior?

This library uses the version of TinyMCE I specify.

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-react?

n/a

tinymce should probably be a peer dep. I want to use tinymce directly, and have it depuped with the react bindings as well. Just as react is a peerDep, for the same reasons so too should be tinymce!

cdaringe avatar Aug 28 '22 07:08 cdaringe

Ref: INT-3000

exalate-issue-sync[bot] avatar Aug 28 '22 07:08 exalate-issue-sync[bot]

@cdaringe Thanks for your suggestion! We've added this to our backlog and will consider implementing it.

yacodes avatar Dec 12 '22 19:12 yacodes

The component uses the version of TinyMCE loaded on the page. If you do not load a version of TinyMCE on the page it will load it from the cloud, defaulting to the latest version 6 release. Please read this to get a full understanding of the loading order: https://www.tiny.cloud/docs/tinymce/6/react-ref/#configuring-editor-source

The reason why it is not a peer dependency is that the TinyMCE in node_modules is only specified to provide types - if we had specified it as a peer dependency it would imply that it was the version loaded on the page. The tinymce-react package also has a very permissive version range for its tinymce dependency so you can specify almost any version of tinymce in your own package.json and it will use the same version.

tiny-james avatar Jan 05 '23 05:01 tiny-james