Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 4d22973

Browse files
committed
Added more options. Pre-merged #31.
1 parent 697b452 commit 4d22973

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/ui-ace.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,32 @@ angular.module('ui.ace', [])
3737
if (angular.isDefined(opts.useWrapMode)) {
3838
session.setUseWrapMode(opts.useWrapMode);
3939
}
40+
if (angular.isDefined(opts.showInvisibles)) {
41+
acee.renderer.setShowInvisibles(opts.showInvisibles);
42+
}
43+
if (angular.isDefined(opts.showIndentGuides)) {
44+
acee.renderer.setDisplayIndentGuides(opts.showIndentGuides);
45+
}
46+
if (angular.isDefined(opts.useSoftTabs)) {
47+
session.setUseSoftTabs(opts.useSoftTabs);
48+
}
49+
50+
// commands
51+
if (angular.isDefined(opts.disableSearch) && opts.disableSearch) {
52+
acee.commands.addCommands([
53+
{
54+
name: 'unfind',
55+
bindKey: {
56+
win: 'Ctrl-F',
57+
mac: 'Command-F'
58+
},
59+
exec: function () {
60+
return false;
61+
},
62+
readOnly: true
63+
}
64+
]);
65+
}
4066

4167
// onLoad callback
4268
if (angular.isFunction(opts.onLoad)) {

0 commit comments

Comments
 (0)