-
Notifications
You must be signed in to change notification settings - Fork 9
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
Replace ace with source-editor.jsm #11
Comments
That link says "This component has been removed from the platform in Firefox 28." Looks like Firefox uses the CodeMirror code editor now: stylish-userstyles/stylish#141 |
I tried invoking the build-in CodeMirror, using stylish-userstyles/stylish@96f0d96 and the above link as guidance, but I couldn't get a CodeMirror editor window to render in Scaffold. @aurimasv, do you have some time to look at this? Once that part works, it looks like the rest of the required code changes (mostly I/O to the editor windows) should be within my reach. (I would like to use CodeMirror for the Zotero Reference Test pane as well, FWIW) |
Do you want to start a pull request (or just a branch on your fork of Scaffold) with the changes you have now and we can work up from there? (to be perfectly honest, I'm feeling a bit lazy and would rather debug your code than write it up from scratch) |
It's rather unfamiliar territory for me, so I didn't get very far. It looks like Ace is initialized at https://github.com/zotero/scaffold/blob/master/chrome/content/scaffold/aceWrapper.js#L40 (and via https://github.com/zotero/scaffold/blob/master/chrome/content/scaffold/scaffold.js#L102 ?) I also found iframes that call to the Ace library in scaffold.xul. E.g. https://github.com/zotero/scaffold/blob/master/chrome/content/scaffold/scaffold.xul#L130 unescapes to:
|
Sorry for the state of the Ace integration-- it was a bit of a hack and I knew nothing about XUL or Ace. |
Any chance you can take a look, @avram? :) The benefit of switching to CodeMirror is arguably relatively minor for scaffold, but I was hoping to use it as a template for using CodeMirror in the Zotero Reference Test pane, which currently just has a text field, and where we probably wouldn't want to add a dependency for Ace. |
There are actually good reasons to do it for Scaffold (e.g. incorporating a
|
Any further thoughts on this? One way or another we'll want to switch to unminified files before submitting the XPI for signing to avoid hearing from Mozilla later, and right now all the ACE files are minified. |
It might still be worthwhile to replace ACE with the CodeMirror editor included in Firefox (and use it for csledit.xul as well). I still can't figure out how to load the Firefox editor, though. If I use the instructions at https://developer.mozilla.org/en-US/docs/Tools/Editor I figured I might have to do something like PS. I just found https://github.com/nt1m/devtools-prototyper/search?utf8=%E2%9C%93&q=sourceeditor, which seems to use the CodeMirror editor. |
We activated JSLinter, Search and Replace feature in ACE and are working on the Autocompletion. It does not seem to be necessary anymore to switch away from ACE. |
Firefox 11 and later include a built-in source editor. We should use this instead of ace.
The text was updated successfully, but these errors were encountered: