I am using a RadEditor and a asp.net validator to validate the radeditor. But the validator always is triggered and fails the validation even thought there is some text in the editor. But if I put an <img></img> tag then it passes the validation:
for example this does not validate:
iuyuy<br />
qqwwq<br />
<br />
<span style="color: #ff0000">qwwqe</span><br />
but this does validate:
iuyuy<br />
qqwwq<br />
<br />
<span style="color: #ff0000">qwwqe</span><br /><img></img>
this is my radeditor and validator:
<
telerik:RadEditor SkinID="DescriptionPanEditor" ID="txtBody"
runat="server" Height="250px" Width="99%" AllowScripts="True" EditModes="all">
<Tools>
<telerik:EditorToolGroup Tag="FileManagers">
<telerik:EditorTool Name="AddImageBut" ShowIcon="true" />
<telerik:EditorTool Name="AddVideoBut" ShowIcon="true" />
</telerik:EditorToolGroup>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="JustifyCenter" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="ForeColor" />
<telerik:EditorTool Name="BackColor" />
<telerik:EditorSeparator />
</telerik:EditorToolGroup>
</Tools>
<Content>
</
Content>
</telerik:RadEditor>
<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList[
"AddImageBut"] = function(commandName, editor, args)
{
DoLoadNewPhoto();
//for example you can apply bold formatting by firing the editor.fire("Bold");
};
Telerik.Web.UI.Editor.CommandList[
"AddVideoBut"] = function(commandName, editor, args)
{
DoLoadNewPhoto();
//for example you can apply bold formatting by firing the editor.fire("Bold");
};
</
script>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtBody" SetFocusOnError="true"
Text="The Title field is required." ToolTip="The Title field is required." Display="Dynamic"></asp:RequiredFieldValidator>