[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[orion-dev] Making the Editor easier to reuse
|
Hello everyone!
Mozilla's integration of Orion currently only makes use of the TextView
and the rest of the relevant scripts:
- /orion/textview/keyBinding.js
- /orion/textview/rulers.js
- /orion/textview/undoStack.js
- /orion/textview/textModel.js
- /orion/textview/tooltip.js
- /orion/textview/textView.js
- /orion/editor/htmlGrammar.js
- /orion/editor/textMateStyler.js
- /examples/textview/textStyler.js
We concatenate these scripts into one big file, orion.js, that we ship in
Firefox.
We have a chrome-privileged JavaScript module that wraps some of the Orion
API. This script also makes customizations and changes we consider needed,
using only the public Orion API.
What we like about the current setup is we can just pull from Orion's git
repo and run our Makefile to quickly build orion.js. This allows us to
quickly update our Orion copy from upstream, when needed. No patching is
needed.
We would like to use more of the Orion upstream features. Many more
features are built into the editor.js and editorFeatures.js scripts.
Unfortunately, at the moment these scripts are not reusable without
patching, in our case.
Our concerns are with the following parts of the code:
editor.js:
- We need to be able to enable/disable animations.
editorFeatures.js
- UndoFactory. allow one to change the keyboard shortcuts.
- TextActions: we need more control on which keybindings and actions are
added to the TextView. We also need to be able to change the shortcuts.
- SourceCodeActions: same as above.
These scripts also have strings hard-coded. We would like a
LocalizationFactory of some sorts that would allow us to plug our strings
into the editor.
In terms of features, we need to be able to pick which ones are enabled.
This is something that's already possible with editor.js (which is great),
but this is not always the case with editorFeatures.js.
I also looked into contentAssist.js and webContentAssist.js. These look to
be close to what we need. Once we get to use the content assist feature we
will most-likely have more comments. I expect we will build our own
content assist providers for JavaScript and probably CSS as well.
How shall we proceed about the changes we need for editor.js and
editorFeatures.js? Shall we open bug reports about each change?
Thank you!
Best regards,
Mihai