editor-js / embed

Embed Tool for Editor.js
MIT License
149 stars 107 forks source link

Regular pasted URLs (not matcing any activated service) are inserted twice #78

Open Haraldson opened 2 years ago

Haraldson commented 2 years ago

I paste once. The URL is inserted twice.

That’s it. That’s the entire issue.

Akash187 commented 2 years ago

Yes, I am also facing the same. Also once you paste the link embed renders but the link is not deleted.

Akash187 commented 2 years ago

After a thorough inspection, I found that this issue is due to react 18 strict mode. Removing strict mode fixes the issue. Also, try to build the app and check if this fixes in case removing strict mode did not work.

In my case, even the editor is getting rendered twice. Editorjs React 18 bug

@Haraldson can you confirm that you faced this issue while using react or not and which version.

Haraldson commented 2 years ago

I face(d?) this issue on React 17, so it’s not about React 18.

Akash187 commented 2 years ago

Thanks, @Haraldson for me react 17 seems to work fine with strict mode. you can check this repo https://github.com/Walkthroughs/editorjs-with-react I am facing this on React 18 only.