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

Automatic ace mode selection. #4

Open
bekroogle opened this issue Jun 22, 2014 · 1 comment
Open

Automatic ace mode selection. #4

bekroogle opened this issue Jun 22, 2014 · 1 comment

Comments

@bekroogle
Copy link
Contributor

The gist data sent from the server includes a field for the file type. If we concatenated that into an editor.getSession().setMode('ace/mode/'+fileType) command, we could try to incorpoate Gists auto file-type detection.

@namchid
Copy link
Contributor

namchid commented Jun 22, 2014

This got the language for me:

Let res = the responseText

function printLanguage(obj) {
var files = obj.files;
for(f in files) {
console.log(files[f].language);
}
}

printLanguage(res);

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

No branches or pull requests

2 participants