Copy command in menu toolbar "Edit" menu doesn't work for multiple editors
Closed this issue · 5 comments
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
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.
Sure @tnrich, I'll see what I can do.
@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.
@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?
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.