Hi Everyone,
i am trying to set custom font as default font for html editor. Can someone provide guidance on this?.
for your reference i used 'Arial' font instead of custom font.
Code:
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.form.Panel', {
height: 500,
width: 500,
title: 'My Form',
renderTo: document.body,
items: [{
xtype: 'htmleditor',
height: 300,
value: 'Line 1<br />Line2<br />Line3',
enableFont: true,
fontFamilies:['Arial'],
defaultFont:'Arial'
}],
tbar: []
})
}
});
I have tried with listeners also but no luck so far.
Code:
listeners : {
initialize: function(field) {
field.relayCmd('fontname', 'arial');
}
}