PDA

View Full Version : Defaultfont HMLTEditor doesnt work



vizcano
17 Feb 2010, 4:34 AM
Hi!!

I've got this simple code



new Ext.form.HtmlEditor({
id: 'content_doc_editor',
enableFont: true, enableFontSize: true,
fieldLabel: 'Descripción',
defaultFont:'arial',
width: 610, height: 170,
maxLength: 200,
name: 'description',
})


When the editor is rendered its set to "Arial" but when i click on it, changes to Tahoma, anyone knows the reason why this happens?

vizcano
18 Feb 2010, 5:54 AM
No one can help me? I'm going mad with this "simple" bug

vizcano
23 Feb 2010, 4:33 AM
I'm still stuck with this, so please, please, please i beg for your help :(

fay
23 Feb 2010, 5:03 AM
I tried your enableFont, enableFontSize, and defaultFont config options in the examples\form\dynamic.js example and they work fine. There must be something else amiss in your code. See: http://www.extjs.com/learn/Ext_Forum_Help#Posting_a_working_showcase

Note, be careful of the extra comma after "name"

vizcano
24 Feb 2010, 5:59 AM
I've removed every ext component just to have htmleditor alone, and IE is still changing my font and i'm going completely mad with this

Now in my head i have:



<head>
<link rel="stylesheet" href="/resources/extjs3/resources/css/ext-all.css" type="text/css"></link>
<link rel="stylesheet" href="/resources/css/extjs3/themes/gray-extend.css" type="text/css"></link>
<link rel="stylesheet" href="data/style/extjs/backoffice.css" type="text/css"></link>
<link rel="stylesheet" href="data/style/extjs/grid_tree.css" type="text/css"></link>
<link rel="stylesheet" href="data/style/extjs/htmleditor_picture.css" type="text/css"></link>
<script type="text/javascript" src="/resources/extjs3/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/resources/extjs3/ext-all-debug.js"></script>

<script type="text/javascript" src="/resources/extjs3/src/locale/ext-lang-es.js"></script>
<script type="text/javascript" src="logic/scripts/backoffice2.ext.js"></script>
</head>




And on backoffice2 i have



Ext.BLANK_IMAGE_URL = "/resources/extjs/resources/images/default/s.gif";

//quita el false del htmleditor http://www.extjs.com/forum/showthread.php?t=76659
Ext.SSL_SECURE_URL = Ext.isIE && Ext.isSecure ? "javascript:''" : 'about:blank';


Ext.onReady(function() {
var createDocWindow = function() {
var docWindow = new Ext.Window({
animateTarget: "west",
draggable: true, modal: true,
layout: 'fit',
formPanel: null,
width: 670, height: 570,
closeAction: 'hide',
plain: true,
items: [
new Ext.form.HtmlEditor({
id: 'content_doc_editor',
enableFont: true, enableFontSize: true,
fieldLabel: 'Descripción',
width: 610, height: 170,
maxLength: 200,defaultFont:'arial',
name: 'description'
})
]
});
docWindow.show();
}
createDocWindow();
});

fay
24 Feb 2010, 6:25 AM
You didn't originally mention that this was an IE issue only. Add the following to your HtmlEditor's config options and it works:


style:'font-family:"arial";',

vizcano
24 Feb 2010, 8:07 AM
OMG i love you