[FIXED] [V0.3] HtmlEditor > Error setting FontFamilies

  1. #1

    [FIXED] [V0.3] HtmlEditor > Error setting FontFamilies

    Error setting FontFamilies property.
    In design mode:
    Can not create obiect type 'System.String[]' from 'String[]Array' propertie 'FontFamilies'
    Programmatically:
    <code>
    protected void Page_Load(object sender, EventArgs e)
    {
    HtmlEditor1.FontFamilies = { "Tahoma", "Verdana", "Arial" };
    }
    </code>
    System.String[] is visible in dropdown list instead of font families
    here is a link that shows this situation: http://link.imgshare.us/2ipASf
  2. #2

    RE: [FIXED] HtmlEditor > Error setting FontFamilies

    Hi Yaki,

    Thanks for reporting the bug. We'll get right on this. I'll reply as soon as a fix is available, which should be real quick.
    Geoffrey McGill
    Founder
  3. #3

    RE: [FIXED] HtmlEditor > Error setting FontFamilies



    This bug has been fixed.

    The string array was not getting serialized into JSON properly. The new code will be available in the next release (current v0.3.1).

    The following sample demonstrates how to set the FontFamilies property of the HtmlEditor control.

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Web.UI" Namespace="Coolite.Web.UI" TagPrefix="cool" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            this.HtmlEditor1.FontFamilies = new string[] { "Tahoma", "Verdana", "Arial" };
        }
    </script>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>HtmlEditor FontFamilies</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <cool:ScriptManager ID="ScriptManager1" runat="server" />
            
            <cool:HtmlEditor 
                ID="HtmlEditor1" 
                runat="server"
                />
        </form>
    </body>
    </html>
    </p>
    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 3
    Last Post: Oct 02, 2009, 6:04 AM
  2. Replies: 5
    Last Post: Jan 27, 2009, 10:19 AM
  3. Replies: 1
    Last Post: Dec 30, 2008, 5:25 AM
  4. Replies: 4
    Last Post: Nov 27, 2008, 6:45 AM
  5. Replies: 4
    Last Post: Sep 10, 2008, 4:17 AM

Posting Permissions