Hi Guys,
I'm trying to get a reference from javascript script to the FCKeditor, as shown below:
var oEditor = FCKeditorAPI.GetInstance('content') ;
if the page is outside a Masterpage it works fine, but if I put the control in a Masterpage, that line returns null. Is there any other way to get the content of the control?
<%@ Page MasterPageFile="~/MasterPage.master" ValidateRequest="false" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function Button2_onclick() {
GetWordCount();
}
function GetWordCount(){
//Returns null !!!
alert(FCKeditorAPI.GetInstance('content'));
}
</script>
<div>
<FCKeditorV2:FCKeditor ID="content" runat="server" ToolbarCanCollapse="true" EnableSourceXHTML="true">
</FCKeditorV2:FCKeditor>
</div>
</asp:Content>
Thanks !
Erich.
I'm trying to get a reference from javascript script to the FCKeditor, as shown below:
var oEditor = FCKeditorAPI.GetInstance('content') ;
if the page is outside a Masterpage it works fine, but if I put the control in a Masterpage, that line returns null. Is there any other way to get the content of the control?
<%@ Page MasterPageFile="~/MasterPage.master" ValidateRequest="false" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function Button2_onclick() {
GetWordCount();
}
function GetWordCount(){
//Returns null !!!
alert(FCKeditorAPI.GetInstance('content'));
}
</script>
<div>
<FCKeditorV2:FCKeditor ID="content" runat="server" ToolbarCanCollapse="true" EnableSourceXHTML="true">
</FCKeditorV2:FCKeditor>
</div>
</asp:Content>
Thanks !
Erich.