Open optimatex opened 7 years ago
IDK how you should pass this argument. But in the original plugin, it's here: https://github.com/Alex-D/Trumbowyg/blob/develop/plugins/upload/trumbowyg.upload.js#L18
I ended up copying the upload plugin in another file and hard-writting my new parameters in that file and requiring that one instead of the bundled with trumbowyg.
To avoid reactjs's eslint errors I added to my plugin copy those lines before and after the code:
/* eslint-disable */
plugin code
/* eslint-enable */
I'm not sure if this way will work in production build but the upload plugin is simply useless if it cannot be configured...
Would be great to able to configure plugins from Reactjs component itself to avoid ugly things like this :/ Maybe a component prop as @optimatex was trying to do.
Okay, this was a while ago but yesterday I came up with the same issue. To solve it, I rebuilt react-trumbowyg with the latest version of babel, and now it works!
In order to be able to use it until someone updates the original project, I published it on NPM https://www.npmjs.com/package/react-trumbowyg_friendly
Hope this helps someone.
Hi. My current implementation is next:
but it tries to upload images on
http://localhost:3198/plugins/upload/trumbowyg.upload.php
How can i change uploader url or set more options like callbacks on load ? maybe i can pass custom onLoad handler for this plugin ?