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

Copy command in menu toolbar "Edit" menu doesn't work for multiple editors #24

Closed
ryan-stackwave opened this issue Sep 11, 2023 · 5 comments · Fixed by #57
Closed

Copy command in menu toolbar "Edit" menu doesn't work for multiple editors #24

ryan-stackwave opened this issue Sep 11, 2023 · 5 comments · Fixed by #57

Comments

@ryan-stackwave
Copy link
Contributor

@tnrich

The implementation of the copy command for the menu toolbar assumes there is only one element with class veVectorInteractionWrapper so copying via the "Edit" menu doesn't work for the second editor on a page:
https://github.com/TeselaGen/tg-oss/blob/master/packages/ove/src/commands/index.js#L362

@tnrich
Copy link
Collaborator

tnrich commented Sep 13, 2023

HI @ryan-stackwave you're right, good catch. I think we should be scoping to the unique editorName of the given editor. Any chance you'd want to add a PR for that functionality? We're not using multiple editors on the same page yet.

@ryan-stackwave
Copy link
Contributor Author

Sure @tnrich, I'll see what I can do.

@ryan-stackwave
Copy link
Contributor Author

@tnrich, bad news. It looks like I can't upgrade to this version of ove yet because react 18 conflicts with another library I'm using. I'll have to look at this again when I upgrade react and work around in the meantime.

@tnrich
Copy link
Collaborator

tnrich commented Sep 19, 2023

@ryan-stackwave I don't think you need to be using react 18 to use this version of ove? Are you seeing errors when trying to upgrade?

@ryan-stackwave
Copy link
Contributor Author

Sorry for the delay @tnrich, got caught up in other priorities. I found the issue with using react 16 with ove and it seems to be because I'm using webpack. I was able to workaround it by specifying aliases in my webpack.js file to force all libraries to use my chosen version of react:

alias: {  
    react: path.resolve(__dirname, "./node_modules/react"),  
    "react-dom": path.resolve(__dirname, "./node_modules/react-dom"),  
    "react-redux": path.resolve(__dirname, "./node_modules/react-redux")  
}

This stackoverflow post seems to indicate that changing ove to make the react libraries peerDependencies rather than dependencies might make it more compatible with webpack but I haven't tried it yet.

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

Successfully merging a pull request may close this issue.

2 participants