PDA

View Full Version : [FIXED] [V0.3] HtmlEditor > Error setting FontFamilies



Yaki
Feb 19, 2008, 9:24 AM
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

geoffrey.mcgill
Feb 19, 2008, 9:55 AM
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
Feb 20, 2008, 7:05 AM
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>