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

Question: Multiple MirrorSharp areas #176

Open
joelpryde opened this issue Sep 6, 2021 · 1 comment
Open

Question: Multiple MirrorSharp areas #176

joelpryde opened this issue Sep 6, 2021 · 1 comment
Labels

Comments

@joelpryde
Copy link

I've been trying to get multiple mirrorsharp areas (or even one mirrorsharp area and a codemirror area) working in the same page - but haven't had any luck. The page seems to freeze up if I iterate through const textareas = document.getElementsByTagName('textarea'); and set them up either both as mirrosharp areas (with separate endpoints) or the first as a mirrosharp area and the second as a codemirror area (with _codemirror.default.fromTextArea).

Has anyone had any luck getting this to work - or has an an example I can take a look at? Many thanks!

@ashmind
Copy link
Owner

ashmind commented Oct 2, 2021

Thanks for asking! Interesting -- if they are completely separate, I would expect it to work.
As far I remember mirrorsharp does not create any singletons.

If the page is freezing up, it might be good to run Chrome Profiler (in dev tools) to see what is it trying to do.

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