This is problematic because my application imports plugins from the root froala-editor/ folder, but they don't take effect on the react component because react-froala-wysiwyg initializes its the editor instance from the nested react-froala-wysiwyg/node_modules/froala-editor/ folder.
To support this plugin system, froala-editor should really be a peer dependency of react-froala-wysiwyg.
Currently,
froala-editor
is declared as a regular dependency.Let's say my application declares these dependencies:
With some strict package managers like pnpm or yarn pnp, or using
npm install --global-style
, we end up with a directory structure like:Notice that there are two
froala-editor/
folders.This is problematic because my application imports plugins from the root
froala-editor/
folder, but they don't take effect on the react component because react-froala-wysiwyg initializes its the editor instance from the nestedreact-froala-wysiwyg/node_modules/froala-editor/
folder.To support this plugin system,
froala-editor
should really be a peer dependency ofreact-froala-wysiwyg
.