<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Isdirty</title>
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../fckeditor.js"></script>
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
oEditor.SetData('<b>Changed</b>');
ResetIsDirty();
}
function CheckIsDirty()
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
alert( oEditor.IsDirty() ) ;
}
function ResetIsDirty()
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
oEditor.ResetIsDirty() ;
alert( 'The "IsDirty" status has been reset to ' + oEditor.IsDirty() ) ;
}
-->
</script>
</head>
<body>
<form action="../php/sampleposteddata.php" method="post" target="_blank">
<script type="text/javascript">
<!--
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
oFCKeditor.Create() ;
//-->
</script>
<br />
<input type="submit" value="Submit" />
</form>
<div>
</div>
<hr />
<div id="eMessage">
</div>
<div>
</div>
<div id="eButtons">
<input type="button" value="Check IsDirty()" onclick="CheckIsDirty();" />
<input type="button" value="Reset IsDirty()" onclick="ResetIsDirty();" />
</div>
</body>
</html>
Thu, 10/14/2010 - 19:41
#1
