Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure images_upload_handler #41

Open
pbaris opened this issue Dec 20, 2024 · 3 comments
Open

Configure images_upload_handler #41

pbaris opened this issue Dec 20, 2024 · 3 comments

Comments

@pbaris
Copy link

pbaris commented Dec 20, 2024

I want to use images_upload_handler.

i add a separate script that has the images_upload_handler as in the tinymce documentation, but then when i use it in Java

 tinyMce.configure("images_upload_handler", "example_image_upload_handler");

it does not work, because in the passing config object, attribute images_upload_handler is a string an not a function.

Is there a way to do it?

@mstahv
Copy link
Collaborator

mstahv commented Dec 20, 2024

IIRC the configs are pushed to browser as JSON, so some other route for this (and may some other JS based configs) would be needed.

Why do you need to change the upload handler itself? Setting the URL where images are posted works fine for me.

@pbaris
Copy link
Author

pbaris commented Dec 20, 2024

Is this or i have to implement a file explorer so the users can select the images (it's a requirement).

I have the same problem with the file explorer because file_picker_callback is a function too.

mstahv added a commit that referenced this issue Dec 20, 2024
@mstahv
Copy link
Collaborator

mstahv commented Dec 20, 2024

Not sure if I understood the requirements, but could something what I drafted in fe58104 work? In that PoC a Vaadin dialog is opened that allows to choose from 5 hardcoded files with buttons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants