PDA

View Full Version : html editor - set custom font as default font



vnaren100
3 Sep 2019, 10:45 PM
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.



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.


listeners : {
initialize: function(field) {
field.relayCmd('fontname', 'arial');
}
}