| Summary: | Change "boo" into command to insert block comment | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> | ||||
| Component: | Client | Assignee: | John Arthorne <john.arthorne> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bokowski | ||||
| Version: | 0.2 | ||||||
| Target Milestone: | 0.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
John Arthorne
Created attachment 187740 [details]
Screen shot
The lowercase "e" that converts text to uppercase is also a bit odd, but at least it does something useful. I agree it needs to be removed, I put this in temporarily. See the comments in coding.js. I have a better idea for an example:
serviceRegistry.registerService("editorAction", {
info: function() {return {name:"Comment"};},
run: function(selectedText, text, selection) { return {text: text.substring(0,selection.start) + "/*" + text.substring(selection.start,selection.end) + "*/" + text.substring(selection.end),
selection: {start:selection.start,end:selection.end+4}}; }
});
This command converts the selection to a block comment. I think it is a useful example that illustrates how to use the various arguments, and does something useful enough that we can leave it in.
I released my block comment example instead. |