Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internet Explorer 11 does not support #826

Closed
kamrul-suhel opened this issue Jun 27, 2020 · 11 comments
Closed

Internet Explorer 11 does not support #826

kamrul-suhel opened this issue Jun 27, 2020 · 11 comments
Labels

Comments

@kamrul-suhel
Copy link

kamrul-suhel commented Jun 27, 2020

I do not know is this is my setup issue or it is a bug. some reason this editor do not support Internet explorer 10, 11. I try to add react-app-polyfill steal it won't work. everything become blank but chrome & firefox it does work.
will you please look for this issue.
And the documentation is gone. I tried to find some doc but none of your doc page is working.
Thank you

@macrozone
Copy link
Collaborator

the editor should work in readOnly mode on ie11, but you might check your webpack+babel settings. in particular, you should document any error that you see in IE11.

the documentation is linked in the readme https://github.com/react-page/react-page

but its currently a bit lacking. i hope to be soon be able to update it.

@kamrul-suhel
Copy link
Author

Hi Macrozone thank you for your responde, I am using nextjs & yes I am rendering page with HTMLRenderer which is mention in documentation. but some reason in IE11 it does not render, I think nextjs escaping some polyfill. I tried without nextjs with add react-polifyll (https://www.npmjs.com/package/react-app-polyfill) package, and it does work in IE11. I am not sure which polyfill do i need to enable & how ?
Thank you

@macrozone
Copy link
Collaborator

macrozone commented Jul 7, 2020

@kamrul-suhel i also use nextjs, so i think we can figure this out.

you can try to include polyfill.io. add this in your _document:

<script src="https://polyfill.io/v3/polyfill.min.js?features=String.prototype.repeat%2CString.prototype.startsWith%2CString.prototype.endsWith%2CSet%2CMap%2CURLSearchParams%2CArray.from" />

by the way:

instead of using the <HTMLRenderer /> directly, you can use

import Editor from "@react-page/editor";

// ...

 <Editor
            plugins={plugins}
            value={yourEditorValue}
            readOnly
    />

setting readOnly to true will render it without editor ui (effectivly using the HTMLRenderer

setting readOnly to false will additionaly load all editor stuff. It will lazy load everything editor related, so you don't have to worry about bundle size. This will enable you to switch between editor and read only presentation on-the-fly

@kamrul-suhel
Copy link
Author

Thank @macrozone that great, I thought my bundle size will be bigger that why I used HTMLRenderer. Thank for this & I tried with polyfill.io/v3/ to load into my _document.js file but still getting this error.
error

@macrozone
Copy link
Collaborator

@kamrul-suhel can you figure out what the syntax error is?

IE11 devtools are horrible, but you see at least the column. If you can get the minified file you can jump to the error.
maybe you have more luck running it in dev mode.

also as it is a syntax error, it should not be releated to polyfills

@macrozone
Copy link
Collaborator

@kamrul-suhel i just checked one of my projects and i needed to make next transpile additional modules:

yarn add next-transpile-modules

then in next.config.js:

const withTM = require("next-transpile-modules")([
  "slate",
  "slate-hyperscript",
  "slate-react",
  "slate-schema-violations",
  "uniforms",
  "uniforms-material",
  "uniforms-bridge-simple-schema-2",
]);

module.exports = withTM({
// your custom config})

problem is that more and more modules are shipped as esnext, but next does not transpile them out-of-the-box

@kamrul-suhel
Copy link
Author

@macrozone perfect that load & it work properly, thank you @macrozone much appreciate. you save my lot of time.
Thank you again.

@macrozone
Copy link
Collaborator

@kamrul-suhel your welcome! i will add it to the docu for future reference

@kamrul-suhel
Copy link
Author

Hi @macrozone hope you are good. I am sorry about this but some reason from yester I checked in internet explorer 11, the site has same issue what it was. I did not change anything in my package.json or next.config.js file it same it was but some how it is broke again. will you please help. Thank you

@macrozone
Copy link
Collaborator

@kamrul-suhel is is the same issue? can you open up a new issue and describe the error that you see? (also logs from internet exporer are important)

@kamrul-suhel
Copy link
Author

Hi @macrozone thank you & much appreciate. yes it is same issue it is now live. https://www.studio-you.co.uk/how-it-works
I have attached some ie 11 debug
2020-10-23 (2)
2020-10-23 (1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants