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

Capability for more than one Tab in the Ace Pane. #9

Open
bdiz opened this issue May 8, 2017 · 6 comments
Open

Capability for more than one Tab in the Ace Pane. #9

bdiz opened this issue May 8, 2017 · 6 comments
Labels

Comments

@bdiz
Copy link

bdiz commented May 8, 2017

Is there a way to have more than one tab through ember-ace?

I had been changing the value attribute to handle different documents, but this is not ideal. For one, undo functionality gets confused. I think the intended Ace approach for doing this is to use a new Tab for each document.

@dfreeman
Copy link
Owner

dfreeman commented May 8, 2017

I haven't seen an in-Ace notion of tabs — is there documentation for that somewhere?

You're definitely right that changing the value attribute can lead to some weird behavior. You can actually see that Ember Twiddle has the same problem with their CodeMirror integration when you switch between documents.

I have a half-baked addon that I've been using to manage tabs external to the editor itself, though there you have essentially the opposite problem: when you switch tabs within a pane and then switch back, the undo history is lost because the component is completely torn down. I could imagine interacting with the editor's UndoManager to persist this as part of document state, but it's not something I've looked into much.

@bdiz
Copy link
Author

bdiz commented May 8, 2017 via email

@dfreeman
Copy link
Owner

dfreeman commented May 9, 2017

There's a (fuzzy) distinction between Ace itself, which is just the editor, and the Cloud9 platform as a whole, which includes all the rest of the "IDE stuff" like tab/pane management, a debugging framework, and other things outside the core functionality of editing code.

The stuff at apidoc.c9.io is API documentation for the Cloud9 platform as a whole, while ace.c9.io has docs specifically for Ace.

@bdiz
Copy link
Author

bdiz commented May 10, 2017 via email

@dfreeman
Copy link
Owner

It's entirely possible that there could be value in an addon wrapping up the Cloud9 platform as a whole — I haven't looked into it in much depth because I haven't needed a lot of the other specific aspects of it.
The core is also at alpha status right now, so I'd be a little nervous to start building against it, but that doesn't mean it's not worth investigating 🙂

@VincentMolinie
Copy link

VincentMolinie commented Aug 10, 2018

In pure JS, it's much easier in ember ;)
https://codepen.io/vincentmolinie/pen/bjBPvg

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

3 participants