How to use images_upload_handler with TinyMCE6 on Xanadu

K_Suhara
Tera Contributor

Hello
Please provide me with information on the subject.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0792300

As mentioned in the article above, I used the following UI script for TinyMCE4 in Wahinsgton DC.

 images_upload_handler: function(blobInfo, success, failure) {

However, on Xanadu it becomes TinyMCE6 and this code does not seem to work well.

 

https://www.tiny.cloud/docs/tinymce/6/file-image-upload/

According to the site above, the way images_upload_handler is written has changed since TinyMCE6.

 

Therefore, I rewrote the code as follows according to the content of the page, but it doesn't seem to work well.

 

images_upload_handler: function(blobInfo, progress) => new Promise((resolve, reject) => {

 

I was wondering if anyone could give me some advice.
Thanks

0 REPLIES 0