Paste as Text - Images Upload Handler - Core Paste #7
Replies: 4 comments 4 replies
-
Interesting. Also, there's tinymce/tinymce#3652 (closed but the last comment says it still occurs). Just if you feel like taking a look at it and maybe figuring out a fix as you're working at the image upload stuff anyway 😀 |
Beta Was this translation helpful? Give feedback.
-
My guess at this point is that the problem is in or near EditorUpload.ts with
I can see the promise chain ... in Uploader.upload ... ie noupload and uploadBlobs But surely somewhere here is where it is broken ... I might trace the callback in 5.10.9 to see where it went |
Beta Was this translation helpful? Give feedback.
-
@carlosmintfan I have this feature fully working in HugeMCE without needing to change any code. I fear I did something stupid - but dont quite understand it yet. I will make my confession once I do. And will describe what happened here. Since I bothered you with this and since I have now gained some understanding of the HugeMCE code I will now turn my attention to tinymce/tinymce#3652 |
Beta Was this translation helpful? Give feedback.
-
We will use TinyMCE 6.8.3 or 6.8.4 for now. Have taken your advice on
board. We are manually copying the code over.
PS. We are very happy to support HugeMCE and get involved. Its an important
piece in the Naverisk solution. Like I said we have a few plugins we
develop ourselves and so will happily add them and accept ideas on how to
make them better. Initially:
1. Templates
2. Versions
3. Variables
…On Sat, 21 Sep 2024 at 1:58 PM, carlosmintfan ***@***.***> wrote:
No worries, I appreciate all your interest and help! But please do not use
HugeMCE in production yet unless you want various 100KB of garbage code to
be injected in your build 😀 See hugemce/hugemce#8
<hugemce/hugemce#8>.
And, if I may know, how are you actually including HugeMCE in your project
although it's not on npm yet? Are you using a Git submodule or manually
copying the code over?
—
Reply to this email directly, view it on GitHub
<#7 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM64TDAD6LK46EH2MBQKXOLZXTHERAVCNFSM6AAAAABOQVSYVWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANZRGA2TIOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
SEE COMMENTS BELOW. This is not actually an issue. So no fix is required. It was an issue with our software. We had both TinyMCE 2.1 and HugeMCE in our software. That caused this issue.
In 6.8.3 Paste is in the core product. Commercial users have access to powerpaste.
These issues are not issues in 5.10.9. I have all this working perfectly with that version. So "paste as text/images upload handler resolve" was broken in 6.0 and remains broken to the latest version, 7.3. Googling does find many others who had this same issue. eg
Did you manage to get video file uploads to go via a url like images_upload_url? I am trying to do the same, but can only get it to upload as base64 encoded data within the text, not as an actual upload via a url. –
[Ben Holness] August 2023
I plan to fix these issues in the HugeMCE code. I am starting on that today and will hopefully have it worked out by Monday. Once I have a fix I will need to know how apply that correctly into the HugeMCE github. I will create a PR for my changes. This is the first time I have tried to work in the TinyMCE code so I am not sure how difficult it will be. eg I see Dialog.ts for the 'Insert/Edit Image" dialog but it is high level. Its not obvious, yet, exactly how Uploader.ts comes into play as we drop an image into the Upload tab. But thats what I will work on finding out. Well I can see the uploadImage function but it's promise returns an UploadResult - our image_upload_handler returns a string promise. Anyway - I will know more by Monday ...
When an images_upload_handler is configured then this also adds an Upload tab to the Image Dialog.
We also have paste_as_text set to true and automatic_uplods set to true.
So two issues:
This is my image upload handler which does not work in 6.8.3. The resolve does not work. A similar version to this works perfectly in 5.10.9. ie "imagesUploadHandler5 = (blobInfo: any, success: any, failure: any)"
Beta Was this translation helpful? Give feedback.
All reactions