Restore source-editor commands controller for scratchpad & styleeditor menus

https://github.com/MoonchildProductions/moebius/pull/290
This commit is contained in:
janekptacijarabaci 2018-03-01 13:45:40 +01:00 committed by Roy Tam
commit 28ab3c0e0d
5 changed files with 114 additions and 0 deletions

View file

@ -488,6 +488,16 @@ Editor.prototype = {
}
},
/**
* The source editor can expose several commands linked from system and context menus.
* Kept for backward compatibility with scratchpad and styleeditor.
*/
insertCommandsController: function () {
const { insertCommandsController } =
require("devtools/client/sourceeditor/editor-commands-controller");
insertCommandsController(this);
},
/**
* Returns text from the text area. If line argument is provided
* the method returns only that line.