Tinymce Cannot read properties of null (reading 'innerHeight') on Image - tinymce

I am using "#tinymce/tinymce-vue": "^3.2.8",
every click on the save on the image picker I got this error.
I can not see any documentation regarding on this part
Cannot read properties of null (reading 'innerHeight')
any solutions for this one?
Thanks!

Related

How can I identify which component is causing a Flutterflow Page Error when loading?

Within Flutterflow
When moving between pages with a navigate action, with variables passed between screens, the destination screen breaks and shows a grey page.
Variables being passed are an amount double, an image path. a string, and an account document object reference.
The screen loads a drop down menu with a list of string values.
The Console Log does not show a lot of information about what went wrong, where the page transition is failing, or which variable is causing issues.
Output when the screen loads is:
Uncaught TypeError: [object Object] is not a function
at Array.map (<anonymous>)
at a0.b8 (main.dart.js?1652057862:88960:18)
at Object.aM (main.dart.js?1652057862:79323:26)
at a0M.eX (main.dart.js?1652057862:96693:10)
at e_k.$1 (main.dart.js?1652057862:177146:8)
at buu.wJ (main.dart.js?1652057862:92138:33)
at die.$0 (main.dart.js?1652057862:91234:11)
at Object.av5 (main.dart.js?1652057862:5177:40)
at bh.o0 (main.dart.js?1652057862:91147:3)
at ceq.$0 (main.dart.js?1652057862:91006:16)
Some guidance would be great, or a way to add console.log() debugging into the flow of actions to break down what the issue is.
If you did not try yet - there is a debug mode which should give you more information on the exceptions. Instead of run select the dropdown next to it and select test.

Manage image deletion in a WYSIWYG editor

When an HTML editor is used and images are added from the local computer, they are uploaded to a server and a link is obtained to put it in the image src attribute. What happens when the img element is removed from the editor? How would the image be deleted from the server? In this case I understand that the image deletion event could be detected and then call a service to delete it. But what happens if the user adds a new image and leaves the page? How would it be deleted in these cases?
In both cases, if the deletion of the images is not managed, it could happen that the server is filled with unused images. How do you usually solve this problem? How is the proper way to solve this?
That's a nice question there. And yeah, for sure the server would fill up with unused images in some point. I'm not an expert on this but I'll try to suggest something so I can implement it too in my WYSIWYG editor haha. I suppose you have a custom modal for the insertion of the image. Upon clicking the button you could save the image link to an array and at SAVE || on leaving the document edit || on popstate event you could make a regex that checks the innerHTML of the editor for the specific SRC. If is not found then you could push an ajax request with the image name so you can deleteit. For sure there are more efficient and complex ways to achieve that. Such as creating text ranges and track elements on keydown - Backspace(8) / Deletekey(46).
An other way is that you could track the images that are in use. When the document is saved regex out the images in the document, push them to a db table and periodically make a check from the back end so you can delete those that are not in use.
I don't know if my suggestions are helpful or not. I just saw an interesting subject so I jumped in. Cheers mate.

How to make file clickable in upload collection?

I am doing upload collection component in sap ui5. I want to make file clickable after upload. Previously uploaded files are getting clickable but currently uploaded files are not getting clickable. Please help me to find solution.
Below is my XML code :
You have not set the mode for the Upload list, by default this is set to None. Add a mode parameter in you List as below. This will make the List clickable.
mode="SingleSelectMaster"
Reference:
https://sapui5.netweaver.ondemand.com/#docs/api/symbols/sap.m.UploadCollection.html#getMode
https://sapui5.netweaver.ondemand.com/#docs/api/symbols/sap.m.ListMode.html

How to inhibit multiselect with SWFUpload

SWFU.selectFile() doesn't work anymore due to changes in security model.
User click on the movie opens the dialog but I need to inhibit multi-select.
I have tried the following options to no avail:
file_upload_limit
file_queue_limit
It is not evident to me from the documentation which option inhibits multi-select. Can anyone advise?
Found it in the source code, searching for "button". The default is
button_action: SWFUpload.BUTTON_ACTION.SELECT_FILES
and there is a value defined
SWFUpload.BUTTON_ACTION.SELECT_FILE

File Upload not working after moving form field

I have a large form with a image upload field working ok.
Field is defined in model as:
$this->add('filestore/Field_Image','thumbnail_id');
Then I created two tabs inside form:
$tabs=$form->add('Tabs');
$main=$tabs->addTab('General');
$design=$tabs->addTab('Design');
And moved image field to design tab:
$design->add($form->getElement('thumbnail_id'));
Now I can't upload files. When I try I get the following javascript error
Error: cannot call methods on atk4_form prior to initialization; attempted to call method 'submitPlain
Is there any other way to move the field or have upload working again after moving it?
I was trying to use the same method ($design->add($form->getElement('my_element'));) to move a slider into another place on the page. That didn't work - I think it was because the slider input field is not placed on the page the same way as other input fields.
So I tried with the jQuery appendTo-method (I found the hint in a comment from romanish in a documentation page). That worked. But then I experienced the same problem as you - and in the end I gave up and solved the problem by editing the slider-class page.
So I can't help you, sorry, but I guess this points out that there is a general problem related to getting input from moved form elements.