Open newmangreen opened 5 years ago
It seems that IE is not compatible with Function.prototype.name. This lack renders isJoditObject function unable to recognize jodit's intances. This is the cause of some failures in IE. Another problem is the lack of Array.includes support. Both problems seem to be short-term fixable using polyfills, but it would be nice if they were included in the source code.
I don´t know the reason but build/jodit.min.js is not just the minified version of build/jodit.js. May be is webpack discarding the polyfills? Anyway if you includes jodit.js instead jodit.min.js the polyfill are there and at least point 2 is fixed.
Opened an issue #305
@redking00 I checked build/jodit.min.js and it has polyfill for includes
Array.prototype.includes||(Array.prototype.includes=function(e){return this.indexOf(e)>-1})}
and since 3.2.61 isJoditObject does not use Function.prototype.name
Is the problem still relevant?
Sorry, using https://github.com/xdan/jodit/releases/latest, changed issue to outdated link on webpage
I tried "3.3.2" release. 1. Fixed 2. I included, jodit.css and jodit.js but following error is taken on server: File not found: jodit/es6-promise.map I find it from internet and added it but IE still gives "getAll is not supported" in following code:
url: "blaurl",
prepareData: function (formdata) {
formdata.append("BlaBla", "Bla");
var file = formdata.getAll("files[0]")[0];
return formdata;
},
This version also breaks Chrome image upload. When uploaded it just shows image name now.
{
"success": true,
"time": "2019-12-17 11:33:43.316",
"data": {
"baseurl": "SomeURL?FileID=",
"path": "",
"files": [
"123"
],
"messages": []
}
}
This is shown in editor:
SomeURL?FileID=123
3. Still same. 4. Not checked yet.
Hi, @newmangreen 2)
File not found: jodit/es6-promise.map
Please, use jodit.min.css and jodit.min.js files
url: "blaurl", prepareData: function (formdata) { formdata.append("BlaBla", "Bla"); var file = formdata.getAll("files[0]")[0]; return formdata; },
What dow you want to do here? file
variable does't use;
{ "success": true, "time": "2019-12-17 11:33:43.316", "data": { "baseurl": "SomeURL?FileID=", "path": "", "files": [ "123" ], "messages": [] } }
What server side script do you use?
- Show me full code please, how can i repeat it?
- Give me example page, please. Because here https://xdsoft.net/jodit/play.html?defaultMode=2 all works fine
Please, use jodit.min.css and jodit.min.js files
I tried these but same.
Here is my full init code:
var editor = new Jodit(domElement, {
"height": height,
showWordsCounter: false,
showCharsCounter: false,
showXPathInStatusbar: false,
toolbarSticky: false,
uploader: {
url: "/MyServerURL",
prepareData: function (formdata) {
formdata.append("MyCmd", "SaveDocument");
formdata.append("MyRTF", "true");
var file = formdata.getAll("files[0]")[0];
formdata.append("MyUploadDocuments", file);
return formdata;
},
headers: {"X-Requested-With": "XMLHttpRequest"}
}
});
In prepareData method, I wanted to include some more parameters in addition to uploaded image but getAll is not found in IE.
Your play.html link generates file uploader as following which is different than my configuration, please try to use prepareData to see the problem:
var editor = new Jodit("#editor", {
"uploader": {
"insertImageAsBase64URI": true
}
});
It is OK with version 3.1.92: https://jsbin.com/jilawobora/1/edit?html,output Not working with version 3.2.46: https://jsbin.com/bibuqumume/1/edit?html,output
When inserting image from local disk, it gives "Need URL for AJAX request" error message. It works in Firefox and Chrome. Here options:
(IE-Chrome-Firefox), header value is sent to server duplicate. With above uploader options, "X-Requested-With" header is sent as "XMLHttpRequest XMLHttpRequest".
(Firefox) Ace editor is not initialized in code view and because of default style, code is not visible.