Commit 91f355ee authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Add the configuration fontFamily to AceEditor.

parent 845e7a16
......@@ -14,11 +14,17 @@ Ext.define('App.form.field.AceEditor', {
},
alias: 'widget.xaceeditorfield',
/**
* @cfg {String}
* The font family (work only with monospace family)
*/
fontFamily: "Liberation Mono",
/**
* @cfg {Number}
* The font size in pixels
*/
fontSize: 10,
fontSize: 11,
/**
* @cfg {String}
......@@ -54,8 +60,8 @@ Ext.define('App.form.field.AceEditor', {
}];
me.callParent(arguments);
me.panel = me.child('panel');
me.panel = me.child('panel');
me.panel.on('afterrender', me.addEditor, me);
me.initField();
......@@ -84,6 +90,7 @@ Ext.define('App.form.field.AceEditor', {
me.editor = ace.edit(me.panel.getId());
me.editor.getSession().setMode('ace/mode/' + me.language);
me.editor.setFontSize(me.fontSize);
me.editor.setOption("fontFamily", me.fontFamily);
if (me.theme) {
me.editor.setTheme('ace/theme/' + me.theme);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment