Hi there guys.
I've been trying to put to work the Rad Editor with a custom dictionary. It works pretty well until I fire the spellcheking function.
I mean the page loads, but when I try to start the spellcheck process it shows an alert displaying something about not seting the dictionary path.
I've trying setting the property with the Dictionary tags but still doesn't work.
Here's the code:
Here's the code behind:
The tdf file is in the App_Data/Radspell folder (es-Es.tdf)
I've been trying to put to work the Rad Editor with a custom dictionary. It works pretty well until I fire the spellcheking function.
I mean the page loads, but when I try to start the spellcheck process it shows an alert displaying something about not seting the dictionary path.
I've trying setting the property with the Dictionary tags but still doesn't work.
Here's the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OnData.Telerik.Samples.Web.Default" %> |
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" |
Namespace="System.Web.UI" TagPrefix="asp" %> |
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!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>On Data Telerik Samples - Rad Editor</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<div> |
<h1>Ejemplo Rad Editor: funcionalidades comunes.</h1> |
<asp:ScriptManager ID="sprmgrManager" runat="server"> |
</asp:ScriptManager> |
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px"> |
<telerik:RadEditor |
ID="rdEditor" |
runat="server" |
EditModes="All" |
ToolsFile="~/Toolbars/Tools.xml" |
> |
<Languages> |
<telerik:SpellCheckerLanguage Title="EspaƱol" Code="es-ES" /> |
</Languages> |
<ImageManager MaxUploadFileSize="512000" |
UploadPaths="~/Uploads" DeletePaths="~/Uploads" ViewPaths="~/Uploads" EnableImageEditor="true" |
/> |
<Content></Content> |
</telerik:RadEditor> |
<asp:Button runat="server" ID="previsualizar" Text="Previsualizar del Lado del Server" OnClick="previsualizar_Click"/><br /> |
<input type="button" id="btnPrevisualizarCliente" onclick="ShowPreview();" value="Previsualizar del lado del Cliente"/> |
<div runat="server" id="divPrevisualizar"> |
</div> |
<input type ="button" id="btnLimpiar" value="Limpiar Div" onclick="CerrarPopDetalle();" /> |
</telerik:RadAjaxPanel> |
</div> |
<telerik:RadCodeBlock ID="clientDisplayCode" runat="server" > |
<script type="text/javascript"> |
function CerrarPopDetalle(){ |
var divEntryPreview = document.getElementById('<%=divPrevisualizar.ClientID%>'); |
divEntryPreview.innerHTML=""; |
} |
function ShowPreview(){ |
var rdEditor = $find('<%=rdEditor.ClientID%>'); |
var divEntryPreview = document.getElementById('<%=divPrevisualizar.ClientID%>'); |
divEntryPreview.innerHTML = rdEditor.get_html(); |
} |
</script> |
</telerik:RadCodeBlock> |
</form> |
</body> |
</html> |
using System; |
using System.Data; |
using System.Configuration; |
using System.Collections; |
using System.Web; |
using System.Web.Security; |
using System.Web.UI; |
using System.Web.UI.WebControls; |
using System.Web.UI.WebControls.WebParts; |
using System.Web.UI.HtmlControls; |
namespace OnData.Telerik.Samples.Web |
{ |
public partial class Default : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
} |
protected void previsualizar_Click(object sender, EventArgs e) |
{ |
divPrevisualizar.InnerHtml = rdEditor.Content; |
} |
} |
} |