Update build_support for the bm build
This commit is contained in:
parent
2bf1429118
commit
14faa36a51
2 changed files with 29 additions and 27 deletions
|
|
@ -39,20 +39,8 @@
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
var require = window.__ace_shadowed__.require;
|
var require = window.__ace_shadowed__.require;
|
||||||
var deps = [
|
|
||||||
"pilot/fixoldbrowsers",
|
|
||||||
"pilot/index",
|
|
||||||
"pilot/plugin_manager",
|
|
||||||
"pilot/environment",
|
|
||||||
"ace/editor",
|
|
||||||
"ace/edit_session",
|
|
||||||
"ace/virtual_renderer",
|
|
||||||
"ace/undomanager",
|
|
||||||
"ace/theme/textmate"
|
|
||||||
];
|
|
||||||
|
|
||||||
require(deps, function() {
|
|
||||||
|
|
||||||
|
require("pilot/index");
|
||||||
var catalog = require("pilot/plugin_manager").catalog;
|
var catalog = require("pilot/plugin_manager").catalog;
|
||||||
catalog.registerPlugins([ "pilot/index" ]);
|
catalog.registerPlugins([ "pilot/index" ]);
|
||||||
|
|
||||||
|
|
@ -65,6 +53,9 @@ var EditSession = require("ace/edit_session").EditSession;
|
||||||
var UndoManager = require("ace/undomanager").UndoManager;
|
var UndoManager = require("ace/undomanager").UndoManager;
|
||||||
var Renderer = require("ace/virtual_renderer").VirtualRenderer;
|
var Renderer = require("ace/virtual_renderer").VirtualRenderer;
|
||||||
|
|
||||||
|
var catalog = require("pilot/plugin_manager").catalog;
|
||||||
|
catalog.registerPlugins([ "pilot/index" ]);
|
||||||
|
|
||||||
window.__ace_shadowed__.edit = function(el) {
|
window.__ace_shadowed__.edit = function(el) {
|
||||||
if (typeof(el) == "string") {
|
if (typeof(el) == "string") {
|
||||||
el = document.getElementById(el);
|
el = document.getElementById(el);
|
||||||
|
|
@ -373,6 +364,10 @@ function setupApi(editor, editorDiv, settingDiv, ace, options) {
|
||||||
case "showPrintMargin":
|
case "showPrintMargin":
|
||||||
renderer.setShowPrintMargin(toBool(value));
|
renderer.setShowPrintMargin(toBool(value));
|
||||||
break
|
break
|
||||||
|
|
||||||
|
case "showInvisibles":
|
||||||
|
editor.setShowInvisibles(toBool(value));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
options[key] = value;
|
options[key] = value;
|
||||||
|
|
@ -407,7 +402,8 @@ function setupSettingPanel(settingDiv, settingOpener, api, options) {
|
||||||
fontSize: "Font Size:",
|
fontSize: "Font Size:",
|
||||||
softWrap: "Soft Wrap:",
|
softWrap: "Soft Wrap:",
|
||||||
showPrintMargin: "Show Print Margin:",
|
showPrintMargin: "Show Print Margin:",
|
||||||
useSoftTabs: "Use Soft Tabs:"
|
useSoftTabs: "Use Soft Tabs:",
|
||||||
|
showInvisibles: "Show Invisibles"
|
||||||
}
|
}
|
||||||
|
|
||||||
var optionValues = {
|
var optionValues = {
|
||||||
|
|
@ -417,11 +413,16 @@ function setupSettingPanel(settingDiv, settingOpener, api, options) {
|
||||||
coffee: "CoffeeScript",
|
coffee: "CoffeeScript",
|
||||||
html: "HTML",
|
html: "HTML",
|
||||||
css: "CSS",
|
css: "CSS",
|
||||||
|
xml: "XML",
|
||||||
|
svg: "SVG",
|
||||||
c_cpp: "C++",
|
c_cpp: "C++",
|
||||||
|
csharp: "C#",
|
||||||
|
java: "Java",
|
||||||
php: "PHP",
|
php: "PHP",
|
||||||
ruby: "Ruby",
|
ruby: "Ruby",
|
||||||
python: "Python"
|
perl: "Perl",
|
||||||
|
python: "Python",
|
||||||
|
clojure: "Clojure"
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
textmate: "Textmate",
|
textmate: "Textmate",
|
||||||
|
|
@ -451,8 +452,9 @@ function setupSettingPanel(settingDiv, settingOpener, api, options) {
|
||||||
80: "80",
|
80: "80",
|
||||||
free: "Free"
|
free: "Free"
|
||||||
},
|
},
|
||||||
showPrintMargin: BOOL,
|
showPrintMargin: BOOL,
|
||||||
useSoftTabs: BOOL
|
useSoftTabs: BOOL,
|
||||||
|
showInvisibles: BOOL
|
||||||
}
|
}
|
||||||
|
|
||||||
var table = [];
|
var table = [];
|
||||||
|
|
@ -511,15 +513,14 @@ function setupSettingPanel(settingDiv, settingOpener, api, options) {
|
||||||
|
|
||||||
// Default startup options.
|
// Default startup options.
|
||||||
window.__ace_shadowed__.options = {
|
window.__ace_shadowed__.options = {
|
||||||
mode: "text",
|
mode: "text",
|
||||||
theme: "textmate",
|
theme: "textmate",
|
||||||
gutter: "false",
|
gutter: "false",
|
||||||
fontSize: "12px",
|
fontSize: "12px",
|
||||||
softWrap: "off",
|
softWrap: "off",
|
||||||
showPrintMargin: "false",
|
showPrintMargin: "false",
|
||||||
useSoftTabs: "true"
|
useSoftTabs: "true",
|
||||||
|
showInvisibles: "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
})()
|
})()
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ function inject() {
|
||||||
|
|
||||||
load('ace.js', 'text!ace/css/editor.css', function() {
|
load('ace.js', 'text!ace/css/editor.css', function() {
|
||||||
var ace = window.__ace_shadowed__;
|
var ace = window.__ace_shadowed__;
|
||||||
|
ace.options.mode = "javascript";
|
||||||
var Event = ace.require('pilot/event');
|
var Event = ace.require('pilot/event');
|
||||||
var areas = document.getElementsByTagName("textarea");
|
var areas = document.getElementsByTagName("textarea");
|
||||||
for (var i = 0; i < areas.length; i++) {
|
for (var i = 0; i < areas.length; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue