Hello, I just noticed that my RadEditors have a problem generating correct HTML Content when I use a toolsfile. If I write a simple text in the editor, center it, change the font to a large size and change the color and push a button which posts back, the content gets generated as this:
"<p align=\"center\"><span>Test</span></p>\r\n"
But if I remove the reference to the toolsfile, the HTML content gets correctly generated like this
"<p align=\"center\"><strong><span style=\"font-size: 48px; color: #ff6666\">Test</span></strong></p>\r\n"
Here is my declaration in a plain vanilla aspx file:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="teleriktest.aspx.cs" Inherits="teleriktest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script runat="server"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="scriptManager" EnablePartialRendering="true" runat="server" />
<telerik:radeditor runat="server" id="radEditor" height="400px" toolsfile="~/Telerik/Editor/Toolsfile.xml"
editmodes="Design" autoresizeheight="true" skin="Web20">
<CssFiles>
<telerik:EditorCssFile Value="~/Skins/Web20/EditorContentArea.css" />
<telerik:EditorCssFile Value="~/Skins/Web20/Editor.Web20.css" />
</CssFiles>
</telerik:radeditor>
<asp:Button runat="server" ID="btnimage" OnClick="onclicked" Text="submit" />
</form>
</body>
</html>
and the toolsfile is this:
<root>
<tools>
<tool name="FindAndReplace"/>
<tool name="Print"/>
<tool name="AjaxSpellCheck"/>
<tool separator="true"/>
<tool name="Cut"/>
<tool name="Copy"/>
<tool name="Paste"/>
<tool separator="true"/>
<tool name="Undo"/>
<tool name="Redo"/>
<tool separator="true"/>
<tool name="ImageManager"/>
<tool name="InsertTable"/>
<tool separator="true"/>
<tool name="LinkManager"/>
<tool name="Unlink"/>
<tool name="InsertSymbol"/>
<tool name="ToggleTableBorder"/>
</tools>
<tools>
<tool name="Bold"/>
<tool name="Italic"/>
<tool name="Underline"/>
<tool separator="true"/>
<tool name="JustifyLeft"/>
<tool name="JustifyCenter"/>
<tool name="JustifyRight"/>
<tool name="JustifyFull"/>
<tool separator="true"/>
<tool name="InsertOrderedList"/>
<tool name="InsertUnorderedList"/>
<tool name="Outdent"/>
<tool name="Indent"/>
<tool name="FormatBlock"/>
<tool separator="true"/>
</tools>
<tools>
<tool name="FontName"/>
<tool name="FontSize"/>
<tool name="ForeColor"/>
<tool name="BackColor"/>
<tool name="ApplyClass"/>
<tool name="InsertCustomLink"></tool>
</tools>
<links>
<link name="telerik" href="http://www.telerik.com">
<link name="Products" href="http://www.telerik.com/products" />
<link name="Purchase" href="http://www.telerik.com/purchase" />
<link name="Support" href="http://www.telerik.com/support" />
<link name="Client.Net" href="http://www.telerik.com/clientnet" />
</link>
<link name="Microsoft">
<link name="Main Site" href="http://www.microsoft.com" />
<link name="MSDN Online" href="http://msdn.microsoft.com" />
<link name="Windows Update" href="http://windowsupdate.microsoft.com" />
</link>
<link name="Search Engines">
<link name="Google" href="http://www.google.com" />
<link name="Yahoo" href="http://www.yahoo.com" />
<link name="AltaVista" href="http://www.altavista.com" />
</link>
</links>
</root>
Upon postback in the "onclicked" event, if you look at the radeditor.content you will notice the incorrect HTML when the toolsfile is used. The incorrect values are random (sometimes it returns the correct value, sometimes it doesn't) but everything is fine as soon as your remove the reference to the toolsfile. Another thing I noticed is that the font sizes change from points to numbers 1-7. What's causing these two problems?
Thanks,
Erin
