Skip to content

Commit d02d0b2

Browse files
committed
Add settings for code editor to show invisibles characters
1 parent 9ee4a39 commit d02d0b2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

addons/cb.files.editor/client.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ define([
2020
'theme': "github",
2121
'fontsize': "12",
2222
'printmargincolumn': 80,
23+
'showinvisibles': false,
2324
'showprintmargin': false,
2425
'highlightactiveline': false,
2526
'wraplimitrange': 80,
@@ -68,6 +69,10 @@ define([
6869
'label': "Show Print Margin",
6970
'type': "checkbox"
7071
},
72+
'showinvisibles': {
73+
'label': "Show Invisibles",
74+
'type': "checkbox"
75+
},
7176
'highlightactiveline': {
7277
'label': "Highlight Active Line",
7378
'type': "checkbox"

addons/cb.files.editor/views/file.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ define([
402402
fontsize: "12",
403403
printmargincolumn: 80,
404404
showprintmargin: false,
405+
showinvisibles: false,
405406
highlightactiveline: false,
406407
wraplimitrange: 80,
407408
enablesoftwrap: false,
@@ -416,6 +417,7 @@ define([
416417
this.$editor.css("font-size", this.options.fontsize+"px");
417418
this.editor.setPrintMarginColumn(this.options.printmargincolumn);
418419
this.editor.setShowPrintMargin(this.options.showprintmargin);
420+
this.editor.setShowInvisibles(this.options.showinvisibles);
419421
this.editor.setHighlightActiveLine(this.options.highlightactiveline);
420422
this.editor.getSession().setUseWrapMode(this.options.enablesoftwrap);
421423
this.editor.getSession().setWrapLimitRange(this.options.wraplimitrange, this.options.wraplimitrange);

0 commit comments

Comments
 (0)