Results 1 to 7 of 7

Thread: Defaultfont HMLTEditor doesnt work

  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    Espaa
    Posts
    215

    Default Defaultfont HMLTEditor doesnt work

    Hi!!

    I've got this simple code

    Code:
    new Ext.form.HtmlEditor({
    	id: 'content_doc_editor',
    	enableFont: true,  enableFontSize: true,
    	fieldLabel: 'Descripcin',
    	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?

  2. #2
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    Espaa
    Posts
    215

    Default

    No one can help me? I'm going mad with this "simple" bug

  3. #3
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    Espaa
    Posts
    215

    Default

    I'm still stuck with this, so please, please, please i beg for your help

  4. #4
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    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...rking_showcase

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

  5. #5
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    Espaa
    Posts
    215

    Default

    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:

    Code:
    <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
    Code:
    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: 'Descripcin',
    				width: 610, height: 170,
    				maxLength: 200,defaultFont:'arial',
    				name: 'description'
    			})
                    ]
    	});	
    	docWindow.show();
        }	
    createDocWindow();
    });

  6. #6
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    You didn't originally mention that this was an IE issue only. Add the following to your HtmlEditor's config options and it works:

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

  7. #7
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    Espaa
    Posts
    215

    Default

    OMG i love you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •