Use WangEditor2 to do text editor primarily for business people to upload pictures
The back of the business staff to reflect the image upload pictures no way to display
The first judgment is that the upload error causes the picture echo to fail
View IP discovery has the OnLoad method, after the call found write this method will be the original overall coverage and I just need to increase the failure prompt
Then add a bit of code under the ONLOADF method to send a function to make your own request prompt
Fns.myonload&&fns.myonload (Resulttext)
Then the business people will reflect the problem of the main operation first upload 9 pictures deleted after the addition of 7 will not be displayed
_wangeditoruploadfiles.length=9 was found by print test; Is that the previous value should be the cause of this
if (_wangeditoruploadfileindexok = = _wangeditoruploadfiles.length) { editor.command (null, ' Inserthtml ', _wangeditoruploadfilehtmls.join (')); }
and find the definition of the variable.
for (var _i = 0;_i<files.length;_i++) { = files[_i]; }
Uploading again without initializing the value of the variable
_wangeditoruploadfiles=[];
So just initialize it before this for.
WangEditor2 version upload image successful echo failure processing